-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Hi,
I want to show menus based on User permissions and Roles in my application, I use Filter function there as per the documentation suggesting
->filter(function($item){
if(User::get()->can( $item->data('permission'))) {
return true;
}
return false;
});
$navbars->get('amazon_repricer')->add('Items', 'items', ['action' => 'AmazonRepricerItems@index'])->prepend('
')->filter(function($item){
if(User::get()->can( $item->data('permission'))) {
return true;
}
return false;
});
But its not working for me and giving error "Call to undefined method Lavary\Menu\Item::filter()"
Please suggest a solution how it will work for me?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels