trait Authorizable

Methods

authorize(UnitEnum|string $ability, mixed $arguments = [])

Determine if the given ability should be granted for the entity.

bool
can(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity has the given abilities.

bool
canAny(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity has any of the given abilities.

bool
cant(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity does not have the given abilities.

bool
cannot(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity does not have the given abilities.

Details

at line 20
Response authorize(UnitEnum|string $ability, mixed $arguments = [])

Determine if the given ability should be granted for the entity.

Parameters

UnitEnum|string $ability
mixed $arguments

Return Value

Response

Exceptions

AuthorizationException

at line 28
bool can(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity has the given abilities.

Parameters

iterable|UnitEnum|string $abilities
mixed $arguments

Return Value

bool

at line 36
bool canAny(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity has any of the given abilities.

Parameters

iterable|UnitEnum|string $abilities
mixed $arguments

Return Value

bool

at line 44
bool cant(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity does not have the given abilities.

Parameters

iterable|UnitEnum|string $abilities
mixed $arguments

Return Value

bool

at line 52
bool cannot(iterable|UnitEnum|string $abilities, mixed $arguments = [])

Determine if the entity does not have the given abilities.

Parameters

iterable|UnitEnum|string $abilities
mixed $arguments

Return Value

bool