class Policy implements ExtenderInterface

Methods

globalPolicy(string $policy)

<p>Add a custom policy for when an ability check is ran without a model instance.</p>

modelPolicy(string $modelClass, string $policy)

<p>Add a custom policy for when an ability check is ran on an instance of a model.</p>

void
extend(Container $container, Extension $extension = null)

No description

Details

Policy globalPolicy(string $policy)

<p>Add a custom policy for when an ability check is ran without a model instance.</p>

Parameters

string $policy

Return Value

Policy

Policy modelPolicy(string $modelClass, string $policy)

<p>Add a custom policy for when an ability check is ran on an instance of a model.</p>

Parameters

string $modelClass
string $policy

Return Value

Policy

void extend(Container $container, Extension $extension = null)

Parameters

Container $container
Extension $extension

Return Value

void