sarga/packages/Sarga/API/Http/Resources/Catalog/Suggestion.php

23 lines
481 B
PHP

<?php
namespace Sarga\API\Http\Resources\Catalog;
use Illuminate\Http\Resources\Json\JsonResource;
class Suggestion extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request): array
{
return [
'id' => $this->id,
'type' => $this->type,
'name' => $this->name,
];
}
}