Role Filter
How to role wise filter in filament
->filters([
Tables\Filters\Filter::make('Manager')
->query(fn (Builder $query): Builder => $query->hasRole('manager'))
])
3 Replies
Please provide some more information. What is not working?
I've added role wise filter but it's not working.
So if you have an error, why didn't you share it in your first message? π
Well, seems like
hasRole()
doesn't exist. Where did you get it from? We don't know your code base, so we can't make assumptions.