-
|
Is there a way to prevent any access (view / edit / ...) to a resource but allow for a specific user to attach them to another resource? In short I don't want the user to see Roles in the sidebar navigation. But I do want them to be able to attach a Role to a User. I've tried denying the user access via 'viewAny' so it doesn't appear in the sidebar. Then added the 'attachRole' to allow that user to attach roles but it's only working when 'viewAny' is true for that user. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
If you want to just hide something from the sidebar navigation, you can explicitly disable it. https://nova.laravel.com/docs/resources/#registering-resources
/**
* Indicates if the resource should be displayed in the sidebar.
*
* @var bool
*/
public static $displayInNavigation = false; |
Beta Was this translation helpful? Give feedback.
You should be able to use the following too: