W3cubDocs

/Laravel 5.8

HandlesAuthorization

trait HandlesAuthorization (View source)

Methods

Response allow(string|null $message = null)

Create a new access response.

void deny(string $message = 'This action is unauthorized.')

Throws an unauthorized exception.

Details

protected Response allow(string|null $message = null)

Create a new access response.

Parameters

string|null $message

Return Value

Response

protected void deny(string $message = 'This action is unauthorized.')

Throws an unauthorized exception.

Parameters

string $message

Return Value

void

Exceptions

AuthorizationException

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