How to use Scopes in Laravel
Laravel allow you to add constraints to all queries for a given model.
2 min readFeb 27, 2022
With this constraints, you can simple query you model without writing a lot of query, which it can be dynamic use.
In the example below I will show you apply a dynamic scope in a model