F
Filament6mo ago
Abi

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:
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()
Jump to solution
6 Replies
Dennis Koch
Dennis Koch6mo ago
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.
Abi
Abi6mo ago
i have 2 panel and I want to show one based on the role Admin -> Show default Panel Customer -> Show Customer Panel
Solution
Dennis Koch
Dennis Koch6mo ago
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()
Abi
Abi6mo ago
can I still use the same filament login page?
Dennis Koch
Dennis Koch6mo ago
Shouldn't be an issue
Abi
Abi6mo ago
ok, let me try
Want results from more Discord servers?
Add your server
More Posts