Closed Mrabdlrhman closed 2 years ago
Hey,
the code example in "good" section do not call the active()
function from the "bad" section.
active()
function in the bad section. Its called getActive()
and its not called anywhere.activeScope()´ which gets called via
->active(). You do not call
scopeActive()` as Laravel is smart enough to call that. Please read the documentation to understand the idea of scopes: https://laravel.com/docs/9.x/eloquent#local-scopes
Hi Konafets,
Thanks for sharing the link.
In the "Good section" we call the "Active" function which exists in the "Bad section". So correct we need to call the "scopeActive" function