class Admin extends User{ use HasRoles, HasSuperAdmin; protected $table = 'users'; protected static function booted() { static::addGlobalScope('admin', function (Builder $builder) { $builder->where('type', 'admin'); }); }}