ИсключениеAuthorizationException
класс AuthorizationException расширяет Exception (Просмотр исходного кода)
Свойства
| protected Response | $response | Ответ от шлюза. | |
| protected int|null | $status | Код HTTP-статуса ответа. |
Методы
| void | __construct(string|null $message = null, mixed $code = null, Throwable $previous = null) Создать новый экземпляр исключения авторизации. | |
| Response | response() Получить ответ от шлюза. | |
| $this | setResponse(Response $response) Установить ответ от шлюза. | |
| $this | withStatus(int|null $status) Установить код HTTP-статуса ответа. | |
| $this | asNotFound() Установить код HTTP-статуса ответа на 404. | |
| bool | hasStatus() Определить, был ли установлен код HTTP-статуса. | |
| int|null | status() Получить код HTTP-статуса. | |
| Response | toResponse() Создать объект ответа отказа от этого исключения. |
Подробности
void __construct(string|null $message = null, mixed $code = null, Throwable $previous = null)
Создать новый экземпляр исключения авторизации.
Response response()
Получить ответ от шлюза.
$this setResponse(Response $response)
Установить ответ от шлюза.
$this withStatus(int|null $status)
Установить код HTTP-статуса ответа.
$this asNotFound()
Установить код HTTP-статуса ответа на 404.
bool hasStatus()
Определить, был ли установлен код HTTP-статуса.
int|null status()
Получить код HTTP-статуса.
Response toResponse()
Создать объект ответа отказа от этого исключения.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Auth/Access/AuthorizationException.html