F
Filament17mo ago
Priyank

How to conditionally show/hide Navigation Groups ?

I tried visible() and hidden() method to hide Navigation Group but it does not work. It is only for the Navigation Items, how can i conditionally hide the Navigation Group for example i want to show the Navigation Group to only users who have role admin ? Please guide !
3 Replies
Dennis Koch
Dennis Koch17mo ago
It’s hidden when all it’s items are hidden
Priyank
PriyankOP17mo ago
So i have these Filament Pages which all have the same Navigation Group and i have registered just the Navigation Group in my Appserviceprovider.php boot method. So should i add the conditional logic in each filament page and thats how my navigation group will be hidden ? Appreciate your help regarding this.
Dennis Koch
Dennis Koch17mo ago
Yes. Because just because the group is hidden it doesn’t mean users cannot access your pages. You need to hide them individually
Want results from more Discord servers?
Add your server