Spatie roles and permissions
Is it possible to use
@can....@endcan in filament?
8 Replies
where you want to apply the Authorization?
Normally I would just add them to the PermissionSeeder class and put @ can.. @endcan on the blade files. Buttons and pages mostly.
But if there's a better way to do it in filament I'm ready to check it out π
ya again depend on your use case... π
for filament pages and respurces yo can use
canVewAny
for actions you can set ->visible(... has role...)
and so on.. each package has its part on authorizationalso by default all resources will read your policies and apply it
Ok ty I'll check it out. But finally, is it possible to give it to something like a role and assign then to users?
Solution
yes also there is plugin make easier like #shield
Ok, many thanks