12345678910111213141516171819202122232425262728 |
- <?php
- /*
- * This file is part of the Jiannei/lumen-api-starter.
- *
- * (c) Jiannei <longjian.huang@foxmail.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- namespace App\Http\Resources\CMS;
- use Illuminate\Http\Resources\Json\JsonResource;
- class NavigationResource extends JsonResource
- {
- public function toArray($request)
- {
- $model = $this;
- return [
- 'id' => (int)$model->id,
- 'user' => $model->name,
- 'link' => $model->link,
- 'is_single' => $model->is_single,
- ];
- }
- }
|