How to avoid to add a resource to nav bar?

Every time I create a new resource, a new menu is added into the left sidebar. How can I avoid this?
Solution:
you could try ```php // in your resource protected static bool $shouldRegisterNavigation = false;...
Jump to solution
3 Replies
Solution
dissto
dissto5mo ago
you could try
// in your resource
protected static bool $shouldRegisterNavigation = false;
// in your resource
protected static bool $shouldRegisterNavigation = false;
realtebo
realtebo5mo ago
it works ! Thanks. Where did you find this info? In this way, I can have related records visible only when opening the master reccord in view/edit
dissto
dissto5mo ago
https://filamentphp.com/docs/3.x/panels/navigation#disabling-resource-or-page-navigation-items Notice the message on that page: "Please note that these methods do not control direct access to the resource or page. They only control whether the resource or page will show up in the navigation. If you want to also control access, then you should use resource authorization or page authorization."