Method |
Description |
|
after ( callable $callback ) |
Register a callback to run after all Gate checks. |
|
allows ( string $ability, array | mixed $arguments = [] ) : boolean |
Determine if the given ability should be granted for the current user. |
|
authorize ( string $ability, array | mixed $arguments = [] ) : Illuminate\Auth\Access\Response |
Determine if the given ability should be granted for the current user. |
|
before ( callable $callback ) |
Register a callback to run before all Gate checks. |
|
check ( string $ability, array | mixed $arguments = [] ) : boolean |
Determine if the given ability should be granted for the current user. |
|
define ( string $ability, callable | string $callback ) |
Define a new ability. |
|
denies ( string $ability, array | mixed $arguments = [] ) : boolean |
Determine if the given ability should be denied for the current user. |
|
forUser ( Illuminate\Contracts\Auth\Authenticatable | mixed $user ) : static |
Get a gate instance for the given user. |
|
getPolicyFor ( object | string $class ) : mixed |
Get a policy instance for a given class. |
|
has ( string $ability ) : boolean |
Determine if a given ability has been defined. |
|
policy ( string $class, string $policy ) |
Define a policy class for a given class type. |
|
resolvePolicy ( object | string $class ) : mixed |
Build a policy class instance of the given type. |
|