How to show a different Filament Panel based on the user role?
I am using Spatie's Laravel Permission. Is there a way to show a different Filament Panel based on the user role?
Solution:Jump to solution
I think with the current implementation you always need to have two urls. Like
/admin
and /client
. Then you can add the guard for those users or use canAccessPanel()
6 Replies
Just use the
canAccessPanel()
method to limit the panel.
Or do you want to swap them based on the role? Not sure whether there is an easy way to do that.i have 2 panel and I want to show one based on the role
Admin -> Show default Panel
Customer -> Show Customer Panel
Solution
I think with the current implementation you always need to have two urls. Like
/admin
and /client
. Then you can add the guard for those users or use canAccessPanel()
can I still use the same filament login page?
Shouldn't be an issue
ok, let me try