© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
10 replies
Patrick

How can I hide NaviationItems in custom NavigationGroup based on user role

Hi there,
As I am using getNavigationItems() it seems not possible? Or is there a way to hide each item based on a user role?

NavigationGroup::make()
->label(__('Reporting'))
->items([
...OrderReportingResource::getNavigationItems()->visible(auth()->user()->hasRole('OrderReportingUser')),
...OrderItemReportingResource::getNavigationItems(),
...ProductReportingResource::getNavigationItems(),
]),
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

how to hide an item in NavigationGroup?
FilamentFFilament / ❓┊help
3y ago
How to Authenticate User based on their Status, and also hide few Resource Pages based on the Role
FilamentFFilament / ❓┊help
3y ago
How to Hide Panel Icons Based on User Roles and Order Panels
FilamentFFilament / ❓┊help
2y ago
How to hide dashboard from "Dashboard" depending on user role?
FilamentFFilament / ❓┊help
16mo ago