Have you tried using laravel policies?
Nov 25, 2024
5
Level 10
How to add custom permissions to a Page in Filament/Shield?
I created a custom page in Filament that I use to create a Kanban task board. I want to add a new permissions specific to that page named "archive_task" so that I can select it for each role individually.
This custom page permission cannot be nested under each model in the "Resources" tab so I can't add it in config/filament-shield.php in entities.custom_permissions because then it would be nested under the models in "Resources" tab which have nothing to do with tasks or the kanban board.
I am using use HasShieldPage in the page but this does nothing.
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
class TaskBoard extends Page
{
use HasPageShield;
}
Please or to participate in this conversation.