F
Filament2y ago
qcol

Conditionally hiding user navigation items

In the documentation there is a description of how to hide the main menu items (NavigationItem visible/hidden). However, this does not work for the user menu in the top right corner (userMenuItems -> MenuItem). I would like to conditionally display these items depending on user permissions. How do I do this?
Solution:
OK, it looks like there will be such an option soon https://github.com/filamentphp/filament/pull/7477/commits so the question will be out of date in a while.
GitHub
Feature: hide menu item by sumardi · Pull Request #7477 · filamentp...
Changes have been thoroughly tested to not break existing functionality. New functionality has been documented or existing documentation has been updated to reflect changes. Visual changes are ex...
Jump to solution
3 Replies
lazydog
lazydog2y ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
qcol
qcolOP2y ago
Yes, I use shield. A normal user won't access this address but the menu item won't disappear, it's all about hiding the item.
Solution
qcol
qcol2y ago
OK, it looks like there will be such an option soon https://github.com/filamentphp/filament/pull/7477/commits so the question will be out of date in a while.
GitHub
Feature: hide menu item by sumardi · Pull Request #7477 · filamentp...
Changes have been thoroughly tested to not break existing functionality. New functionality has been documented or existing documentation has been updated to reflect changes. Visual changes are ex...

Did you find this page helpful?