Example of Global scopes in academico-sis/academico

File app/Models/ExternalCourse.php (link to Github)
use Illuminate\Database\Eloquent\Builder;

class ExternalCourse extends Course
{
     //
    protected static function boot()
    {
        parent::boot();

        static::addGlobalScope('external', function (Builder $builder) {
            $builder->where('campus_id', 2);
        });
    }
    //
}

Additional resources on global scopes: