AuthorizesRequests

trait AuthorizesRequests (View source)

Methods

Response authorize(mixed $ability, mixed|array $arguments = [])

Authorize a given action against a set of arguments.

Response authorizeForUser(Authenticatable|mixed $user, mixed $ability, mixed|array $arguments = [])

Authorize a given action for a user.

array parseAbilityAndArguments(mixed $ability, mixed|array $arguments)

Guesses the ability's name if it wasn't provided.

Details

Response authorize(mixed $ability, mixed|array $arguments = [])

Authorize a given action against a set of arguments.

Parameters

mixed $ability
mixed|array $arguments

Return Value

Response

Exceptions

AuthorizationException

Response authorizeForUser(Authenticatable|mixed $user, mixed $ability, mixed|array $arguments = [])

Authorize a given action for a user.

Parameters

Authenticatable|mixed $user
mixed $ability
mixed|array $arguments

Return Value

Response

Exceptions

AuthorizationException

protected array parseAbilityAndArguments(mixed $ability, mixed|array $arguments)

Guesses the ability's name if it wasn't provided.

Parameters

mixed $ability
mixed|array $arguments

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Foundation/Auth/Access/AuthorizesRequests.html