Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ufodisko's avatar
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;
}
0 likes
5 replies
lilsOfi's avatar

Have you tried using laravel policies?

ufodisko's avatar
Level 10

@lilsOfi I wanted something more granular but I ended up creating custom permissions using spatie/laravel-permission:

php artisan permission:create-permission edit_task

1 like
maned3v's avatar

@ufodisko spatie permissions is a good choise, i use it in almost all my projects

Please or to participate in this conversation.