accessing auth user in panel builder to make custom navigation
I am trying to generate a custom dashboard navigation for users based on the projects they have. So it's quick access from the sidebar. Or if they have pinned tasks ect.
In the panel provider I added
I keep getting error
When I just do
Project::all()
it does generate the items correctly.Solution:Jump to solution
Solution for future people
Make new middleware
```
php artisan make:middleware AddWorkspaceNavigationItems...
4 Replies
tytyty wow got it working with that one
Solution
Solution for future people
Make new middleware
add the middleware to the panel provider
How the middleware is setup