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.
$this
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.
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.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.