generated from panliang/owl-admin-starter
33 lines
819 B
PHP
33 lines
819 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class KeywordResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->id,
|
|
'key' => $this->key,
|
|
'value' => $this->value,
|
|
'parent_id' => $this->parent_id,
|
|
'sort' => $this->sort,
|
|
'level' => $this->level,
|
|
'options' => $this->options,
|
|
'image' => $this->image,
|
|
'images' => $this->images,
|
|
'description' => $this->description,
|
|
'content' => $this->content,
|
|
];
|
|
}
|
|
}
|