I made a custom menu through menu builder with dynamic routes to the BREAD's.
In my view I am looking for a way to only show items current logged in user is allowed to browse.
Proposed solution
having the @can funtion to be able to add routes like @can('browse', $menuitem->route); or @if(Auth::user()->can('browse' . $menu_item->parameters->name)) in every view
Laravel version
9.52.16
PHP version
8.1.27
Voyager version
1.7
Description of problem
I made a custom menu through menu builder with dynamic routes to the BREAD's. In my view I am looking for a way to only show items current logged in user is allowed to browse.
Proposed solution
having the @can funtion to be able to add routes like @can('browse', $menuitem->route); or @if(Auth::user()->can('browse' . $menu_item->parameters->name)) in every view
Alternatives considered
No response
Additional context
No response