Community
Trick
Why is my panel resource missing from the sidebar?
Aug 1, 2023
Panel Builder

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 a panel.

You can learn more about resource authorization in our documentation.

Dan Harrin

Dan is a full-stack developer from the Cardiff, UK. He co-created Filament, and continues to lead development of the project. He works for Kirschbaum, a web development agency.

8
Articles
145
Stars