trait HandlesAuthorization (View source)

Methods

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