Category: Laravel

It also has this concept of scopes, which you can apply globally to a model, or locally throughout your app.

You can chain local scopes to precisely define your query.

It can have one or more comments, and it has scopes to determine if it has a subtitle and whether someone published it this year.

In the boot method of your AppServiceProvider: This package allows you to re-use your scopes as if it was a select statement. With the addScopeAsSelect method, you can dynamically add an attribute to your Model, and call the scopes with a Closure.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners