FilamentF
Filament15mo ago
nowak

Show navigation and topbar conditionally

In my panel provider I am disabling the navigation and topbar like this:
->navigation(false)
->topbar(false)

Since I actually only want to do this for specific roles, I wonder if there is a way to set this conditionally?

This does not seem to be working:
->navigation(fn() => auth()->user()->hasRole('super_admin'))
Was this page helpful?