Skip to main content

Search Results for "global scopes"

We found 16 results for "global scopes".

Tutorial Free

Model Default Ordering: Assigning a Global Scope

Quite an often situation in real-life projects that you have to order lists by a certain condition. For example, countries/cities in alphabetical order everywhere. Is there a way to avoid adding "orderBy" every time we make a list for a dropdown? Apparently, it's pretty easy - we can use Global Scopes.

Haven't found what you're looking for?

Our team is here to help. Ask us anything about Laravel development and we'll get back to you with personalized guidance.

Ask for Personal Help

We'll respond within 24 hours

Function available only for premium members.

Be as specific as possible so we can provide the best guidance.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.