/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Http/Fixtures/PostResource.php
18 строк
401 B
Laurence
change names
31 янв 2018, 19:31
31 янв 2018, 19:31
9229e95
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Http\Fixtures; use Illuminate\Http\Resources\Json\JsonResource; class PostResource extends JsonResource { public function toArray($request) { return ['id' => $this->id, 'title' => $this->title, 'custom' => true]; } public function withResponse($request, $response) { $response->header('X-Resource', 'True'); } }