© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
zander9255

Filament Table Filters

Hi Guys,

First off, I am pretty new to Filament, absolutely loving it so far.
This might be very easy, I just dont know the solution.

I have a couple of filters on my table:

->filters([
Filter::make('Your Account')
->query(fn (Builder $query): Builder => $query->where('AGENT', Auth::user()->getAgentAccnum()))
->checkbox()
->default(),

The filter works well, But I would like the filter to be applied permanently. And the User should not be able to remove the filter. I have tried the ->hidden() approach at the end of the filter, but this seems to not apply the filter, and just hides it.

I have tried to add the where clause in getEloquentQuery() function. And that does apply it, but it then messes with my column's sorting functionality.

Is there a way to prevent the filter from being de-selected? Or is there a better place to filter the initial results?
Solution
Why a filter? I would just apply the scope to the model personally? so if you are filter the records based on a users access level you can scope the model to only ever return data where
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

Use Filament Table Filters With Sushi
FilamentFFilament / ❓┊help
17mo ago
Way To Use Filters Outside a Filament Table?
FilamentFFilament / ❓┊help
2y ago
Table filters result
FilamentFFilament / ❓┊help
10mo ago
Table filters Help
FilamentFFilament / ❓┊help
13mo ago