How to give custom permission to sub-navigation relation manager
I create resource sub-navigation using https://filamentphp.com/docs/3.x/panels/resources/getting-started#resource-sub-navigation and also follow the demo https://demo.filamentphp.com/blog/posts/1 but I want to show/hide navigation button based on permission, I'm using Shield.
If I just put inside table action then I can do like this and it's working
How can I apply (show/hide) result relation manager based on custom permission?
Solution:Jump to solution
I put below code on relation-manager page and it working
```php
public static function shouldRegisterNavigation(array $parameters = []): bool
{
return auth()->user()->can('view_result_list');...
1 Reply
Solution
I put below code on relation-manager page and it working