ResponseTrait
trait ResponseTrait (View source)
Методы
| int | status() Получить код состояния ответа. | |
| string | content() Получить содержимое ответа. | |
| $this | header(string $key, string $value, bool $replace = true) Установить заголовок ответа. | |
| $this | withHeaders(array $headers) Добавить массив заголовков к ответу. | |
| $this | cookie(Cookie|mixed $cookie) Добавить cookie к ответу. | |
| $this | withCookie(Cookie|mixed $cookie) Добавить cookie к ответу. | |
| throwResponse() Выбросить ответ в виде экземпляра HttpResponseException. |
Подробности
int status()
Получить код состояния ответа.
string content()
Получить содержимое ответа.
$this header(string $key, string $value, bool $replace = true)
Установить заголовок ответа.
$this withHeaders(array $headers)
Добавить массив заголовков к ответу.
$this cookie(Cookie|mixed $cookie)
Добавить cookie к ответу.
$this withCookie(Cookie|mixed $cookie)
Добавить cookie к ответу.
throwResponse()
Выбросить ответ в виде экземпляра HttpResponseException.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Http/ResponseTrait.html