Hiding custom page in navigation panel

i want to to hide custom page to non admin users, i saw the below code in the documentation but i don't exactly know how it works. : public static function shouldRegisterNavigation(): bool { return auth()->user()->canManageSettings(); }
2 Replies
Bloom
BloomOP2y ago
i have a role table and in my User Table i have users function public static function shouldRegisterNavigation(): bool { return auth()->user()->roles()->admin; } I try to implement like this
S. Mert ÖZTÜRK
you need to check Multi Tenancies. Firstly you need create team and register user. You can check all page from here; https://filamentphp.com/docs/3.x/panels/tenancy#conditionally-hiding-tenant-menu-items

Did you find this page helpful?