In this video, I talk about query scopes in the Eloquent ORM of the Laravel framework, and I explain how they work under the hood.
I also explain in details the way to define and use each one, and also the difference between global and local scopes.
0:00 Introduction
4:05 Local scopes
8:35 Another example of local scope
11:45 Making local scopes dynamic
12:55 How local scopes work
15:35 Global scopes
21:45 Global scopes as classes
27:04 SoftDeletes scope as an example of global scopes
30:19 Conclusion
Ещё видео!