W3cubDocs

/Laravel 8

AuthorizationException

class AuthorizationException extends Exception (View source)

Properties

protected Response $response The response from the gate.

Methods

void __construct(string|null $message = null, mixed $code = null, Throwable $previous = null)

Create a new authorization exception instance.

Response response()

Get the response from the gate.

$this setResponse(Response $response)

Set the response from the gate.

Response toResponse()

Create a deny response object from this exception.

Details

void __construct(string|null $message = null, mixed $code = null, Throwable $previous = null)

Create a new authorization exception instance.

Parameters

string|null $message
mixed $code
Throwable $previous

Return Value

void

Response response()

Get the response from the gate.

Return Value

Response

$this setResponse(Response $response)

Set the response from the gate.

Parameters

Response $response

Return Value

$this

Response toResponse()

Create a deny response object from this exception.

Return Value

Response

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