- Added
hideWhen
feature to menu item class. This feature is helpful for hiding specific menu item. The menu item will hidden if the callback result is returningtrue
value.
Menu::make('main', function () {
$menu->url('foo','Foo')->hideWhen(function () {
// return boolean
return Auth::check();
});
});