TIP 02 / 08

Laravel Scopes Can Be Combined Using "Higher Order" Orwhere Method.

Following example from the Docs.

Before:

php
User::popular()->orWhere(function (Builder $query) {
     $query->active();
})->get()

After:

code
User::popular()->orWhere->active()->get();