Hi, I'm using filament 4 in my app and I have to config some custom policies after filament shield generates all default policies, right now I have to do it manual after running php artisan shield:generate --all, wondering if there is a way to set it to use customized policy instead of default generated one and prevent it from overwriting?
#How to prevent filament shield overwriting custom policies?
10 messages · Page 1 of 1 (latest)
You ran:
php artisan shield:generate --all --option=policies
To only generate the missing policies?
Oh i didn't know it has other options, will try it thank you
The documentation is great for this…
Thank you for marking this question as solved!
Learn more
hi again, I tried that option in a new deploy but it only works if I do --all option once and then add custom policies and then do that option you mentioned for next times. but when I try it at first deploy it doesn't generate default policies. is there any better way to persist custom policies and generate rest of default policies too?
main issue is resources that are in project but doesn't show in admin panels until I do php artisan shield:generate --all but this way I lose all custom policies
@glacial imp if you want to give my plugin a try https://filamentphp.com/plugins/williams-aguilar-guardian 😏
Run it for missing resources, like —resource=FooResource