Local scopes allow you to define a common condition for Eloquent models that you may easily re-use throughout your application. For example, you may need to frequently retrieve all users that are considered "popular". To define a scope, create an Eloquent model method like function scopeCondition().
Read more in the official Laravel docs.
Read more in the official Laravel docs.