How to apply Laravel Policy to Filament Actions (Export/Import/Custom Actions)?
Hi everyone 
I'm using FilamentPHP and trying to integrate Laravel Policies into my actions, both default (like Export/Import) and custom ones (like a
---
I want to:
Then in my
Is this the correct way? Or is there a more idiomatic "Filament way" to handle this?
I'm using FilamentPHP and trying to integrate Laravel Policies into my actions, both default (like Export/Import) and custom ones (like a
PublishPost action on a PostResource).---
Use Case 1: Export / Import Authorization (resource-wide)
I want to:
- Control visibility of
ExportActionandImportActionusing policy - Prevent execution if user is unauthorized
PostPolicy I have:Then in my
PostResource, I attach:Is this the correct way? Or is there a more idiomatic "Filament way" to handle this?