trait
Illuminate
/
Foundation
/
Auth
/
Access
/
AuthorizesRequests
AuthorizesRequests
Methods
public
authorize ( $ability , $arguments ) : Response
Authorize a given action for the current user.
Parameters
- $ability mixed
- $arguments mixed|array
public
authorizeForUser ( $user , $ability , $arguments ) : Response
Authorize a given action for a user.
Parameters
- $user Authenticatable |mixed
- $ability mixed
- $arguments mixed|array
protected
parseAbilityAndArguments ( $ability , $arguments ) : array
Guesses the ability's name if it wasn't provided.
Parameters
- $ability mixed
- $arguments mixed|array
protected
normalizeGuessedAbilityName ( $ability ) : string
Normalize the ability name that has been guessed from the method name.
Parameters
- $ability string
public
authorizeResource ( $model , $parameter , array $options , $request ) : void
Authorize a resource action based on the incoming request.
Parameters
- $model string|array
- $parameter string|array|null
- $options array
- $request Request |null
protected
resourceAbilityMap ( ) : array
Get the map of resource methods to ability names.
protected
resourceMethodsWithoutModels ( ) : array
Get the list of resource methods which do not have model parameters.