Closed mstfkhazaal closed 8 months ago
How can I only display panels that I have access to
i try this but not work ->visible(fn (): bool => auth()->user()?->hasAnyRole([ 'admin', 'general_manager', 'super_admin', ]));
1.0.5
8.2
10.0
macOS
No response
Hello,
Where are you trying to put your code?
Is it in the panel-switch-menu.blade.php file?
panel-switch-menu.blade.php
use the exclude() method it also accepts a closure
exclude()
What happened?
How can I only display panels that I have access to
How to reproduce the bug
i try this but not work ->visible(fn (): bool => auth()->user()?->hasAnyRole([ 'admin', 'general_manager', 'super_admin', ]));
Package Version
1.0.5
PHP Version
8.2
Laravel Version
10.0
Which operating systems does with happen with?
macOS
Notes
No response