© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
Fogzy

Global Scopes not being ignored on select

I have this select:
Select::make('categories')
  ->relationship('categories', 'title', function (Builder $query): Builder {
      return $query->withoutGlobalScopes();
  })
  ->multiple()
  ->searchable()
  ->preload()
  ->required()
Select::make('categories')
  ->relationship('categories', 'title', function (Builder $query): Builder {
      return $query->withoutGlobalScopes();
  })
  ->multiple()
  ->searchable()
  ->preload()
  ->required()

And everything works fine until I save. Then the options that are displayed are not complete (it's obvious that the global scope is applied).

I have global scopes disabled for the whole resource:
public static function getEloquentQuery(): Builder
{
    return parent::getEloquentQuery()->withoutGlobalScopes();
}
public static function getEloquentQuery(): Builder
{
    return parent::getEloquentQuery()->withoutGlobalScopes();
}


The DB shows that the selected options got saved (4 rows). But the select only shows 3 options selected (since the 4th is blocked by the scope).
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

global scopes ignored on grouping
FilamentFFilament / ❓┊help
3y ago
Default select not being selected
FilamentFFilament / ❓┊help
3y ago
AttachAction not adding entries with global scopes.
FilamentFFilament / ❓┊help
10mo ago
requiredWithoutAll() validation being ignored
FilamentFFilament / ❓┊help
2y ago