Laravel - Apply Global Scopes only on certain routes with Middleware
Laravel include a Query Scopes system. It allow you to add to one or all (depend the type of scope you use) queries a scope with constraints. Query Scopes has 2 types of Scopes :
- Global Scopes : It allow you to add constraints to all queries for a given model.
- Local Scopes : It allow you to de...