Closed bernhardh closed 5 years ago
Like this:
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
(new \Runline\ProfileTool\ProfileTool)->canSee(function ($request) {
return false;
}),
];
}
:+1:
I believe the last comment makes it clear 👍
Like this:
/** * Get the tools that should be listed in the Nova sidebar. * * @return array */ public function tools() { return [ (new \Runline\ProfileTool\ProfileTool)->canSee(function ($request) { return false; }), ]; }
👍
You will can't access the link.
Thats correct, thats no solution. As far as I know, there is no solution to hide a tool form sidebar, if the tool doesn't provide a function for it.
I think the best place for a link to your own profil is in the dropdown of your username (in the right corner of nova). You can easily add this link by changing the code of views/vendor/nova/partials/user.blade.php.
But how can I hide the menu point from sidebar navigation? If I add the ProfileTool to the tools() method of NovaServiceProvider, it is automatically rendered in the sidebar.