© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
lxbln

filter table by default (without the option to remove the filter)

The question is actually pretty simple. In my users table I have a column 'type'. Some users are of type 'admin'. In filament I want to manage only those users. Can I define a filter, that sets type='admin', which can also not be removed. Ideally the filter would not even be visible. Thanks.
Solution
Hi. You don't need a filter...just modify your table query:
$table->modifyQueryUsing(fn (Builder $query) => $query->where('type', 'admin')
$table->modifyQueryUsing(fn (Builder $query) => $query->where('type', 'admin')
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Select filter - remove/disable default option
FilamentFFilament / ❓┊help
3y ago
filterCollapsible open by default
FilamentFFilament / ❓┊help
2y ago
Default option for select filter
FilamentFFilament / ❓┊help
16mo ago
Option to set default table pagination
FilamentFFilament / ❓┊help
2y ago