F
Filament14mo ago
Bloom

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
BloomOP14mo 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
S. Mert ÖZTÜRK14mo ago
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
Want results from more Discord servers?
Add your server