Admin Panel and App Panel access
I've created the default admin panel and another AppPanel as
->default()
how can i control the access to the panels? I want to allow only admin user to access admin panel and other users to access AppPanel.
what's the simplest way to do it?7 Replies
Easiest would be via
canAccessPanel()
method on the User model that you need to implement anywaynow i have this
I would like to control that a particulary user, for example the user with mail [email protected] can access AdminPanel and the other users can access the AppPanel....how can i write this?
I think you get the panel id (app, admin) with
$panel->getId()
and can return your condition based on that.wow thanks a lot! I could not find that function in the docs....thanks again
I agree more with you @ocram_82 - the application has become vast and the documentation shared / provided is far less. But can't really blame - the documentation drive itself is way too much to be covered up with all possible features / functionalities in place!
its good to have this discord - a place where experienced people can share in their inputs with new commers like us π
Thank you very much @Filament team!! and experts around sharing their valuable knowledge and time!
No need to document every method. The class is type hinted, you could easily open the file that contains
Panel
and see all the methods there are. Code diving is a skill that helps a lot in every project πYes, i cannot complain. Filament is an awsome tool, the community is fantastic and the team is super! I can only say thanks to all that help and contribute. Nothing can be perfect but the strive for continuous improvment is very apprecciable
For sure! I'll try to improve this skill!