Have you created a resource, but it's not appearing in the navigation menu?
If you have a model policy in app/Policies
, make sure you return true
from the viewAny()
method.
Many people forget that model policies are generated with models when you run php artisan make:model --all
. Laravel generates an empty viewAny()
method by default, which means that you are unauthorised from accessing that resource in the admin panel.
You can learn more about resource authorization in our documentation.
No comments yet…