Guest and admins
Hello,
I want to be able to login as a guest or as an admin. Then some routes has to be forbidden.
I can do it for resources with canView function.
But for other pages like:
- Users
- Roles
- Translations
- Settings
I dont see how i can make these forbidden for non admins
Does anyone has any expercience with this?
1 Reply
If the models are in packages (ie. not in your app), I think you have to register your policies manually:
https://laravel.com/docs/10.x/authorization#registering-policies
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.