class UsePolicy

Declare the policy class for a model using an attribute.

When placed on a model class, the Gate will use the specified policy class for authorization checks. This takes precedence over policy name guessing but not over explicitly registered policies.

Methods

__construct(string $class)

Create a new attribute instance.

Details

at line 30
__construct(string $class)

Create a new attribute instance.

Parameters

string $class