Essentials

Policies

Automatically apply Laravel Access Control on your policies !

Policies

In order to be applied to the policy, you need to extend the ControlledPolicy class and specify the linked control:

use Lomkit\Access\Policies\ControlledPolicy;
use App\Access\Control\PostControl;

class PostPolicy extends ControlledPolicy
{
    protected string $control = PostControl::class;
}

And you are ready to go, have a look at the usage section to apply the security wherever you want !