class AuthorizationException extends Exception (View source)
| protected Response | $response | The response from the gate. | |
| protected int|null | $status | The HTTP response status code. |
| void | __construct(string|null $message = null, mixed $code = null, Throwable|null $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. | |
| $this | withStatus(int|null $status)
Set the HTTP response status code. | |
| $this | asNotFound()
Set the HTTP response status code to 404. | |
| bool | hasStatus()
Determine if the HTTP status code has been set. | |
| int|null | status()
Get the HTTP status code. | |
| Response | toResponse()
Create a deny response object from this exception. |
Create a new authorization exception instance.
Get the response from the gate.
Set the response from the gate.
Set the HTTP response status code.
Set the HTTP response status code to 404.
Determine if the HTTP status code has been set.
Get the HTTP status code.
Create a deny response object from this exception.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Auth/Access/AuthorizationException.html