© 2026 Hedgehog Software, LLC

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

modifyQueryUsing with a role

hi guys, I have this query in the table function in my productResource but I only want to apply it when the user does not have the 'Admin' role, is there a way to do it?

->modifyQueryUsing(fn (Builder $query): Builder => $query->where('country_id', auth()->user()->country_id))
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

->modifyQueryUsing with relations
FilamentFFilament / ❓┊help
3y ago
modifyQueryUsing breaks ToggleColumn
FilamentFFilament / ❓┊help
2y ago
Using Eloquent extension with getEloquentQuery() or modifyQueryUsing()?
FilamentFFilament / ❓┊help
3y ago
Backend validation when using ModifyQueryUsing
FilamentFFilament / ❓┊help
6mo ago