Laravel Under The Hood - Eloquent ORM Observers
82 بار بازدید -
3 ماه پیش
-
In this video, I talk
In this video, I talk about Laravel Eloquent ORM observers, how to use them properly, and some common bugs you may face while using them.
00:00 Introduction
01:52 What we're trying to achieve
03:24 Defining the listeners
04:07 Increasing views automatically
08:30 Updating the slug column automatically
11:26 Enhancing the observer behavior
14:12 Different Eloquent ORM events types
18:00 Recursion caused by observer
22:22 Operating quietly on models without firing events
23:14 Refactoring into observer classes
31:03 Using the $dispatchesEvents attribute to create observers
32:39 Events don't gets triggered on multiple models
37:28 Soft delete events
39:40 Events gets triggered only when you use Eloquent
40:27 Conclusion
00:00 Introduction
01:52 What we're trying to achieve
03:24 Defining the listeners
04:07 Increasing views automatically
08:30 Updating the slug column automatically
11:26 Enhancing the observer behavior
14:12 Different Eloquent ORM events types
18:00 Recursion caused by observer
22:22 Operating quietly on models without firing events
23:14 Refactoring into observer classes
31:03 Using the $dispatchesEvents attribute to create observers
32:39 Events don't gets triggered on multiple models
37:28 Soft delete events
39:40 Events gets triggered only when you use Eloquent
40:27 Conclusion
3 ماه پیش
در تاریخ 1403/03/30 منتشر شده
است.
82
بـار بازدید شده