© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
9 replies
nowak

Show navigation and topbar conditionally

In my panel provider I am disabling the navigation and topbar like this:
->navigation(false)
->topbar(false)
->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'))
->navigation(fn() => auth()->user()->hasRole('super_admin'))
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

add navigation topbar
FilamentFFilament / ❓┊help
3y ago
How to conditionally show/hide Navigation Groups ?
FilamentFFilament / ❓┊help
3y ago
Conditionally show Relationship (manager)
FilamentFFilament / ❓┊help
2y ago
Conditionally show relation manager
FilamentFFilament / ❓┊help
2y ago