Why is my panel resource missing from the sidebar?

Trick Panels
Dan Harrin avatar Author: Dan Harrin
Published: Aug 01, 2023

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.

The author

Dan Harrin avatar Author: Dan Harrin

Dan is a software engineer from the UK. He is one of the co-creators of Filament, and leads development of the project. He is passionate about open-source software, and building tools that simplify complex problems.

When he's not coding, Dan enjoys music, board games, and cooking.

Articles
11

From the same author