sarga/packages/Webkul/API/Http/Resources/Catalog/AttributeOption.php

24 lines
540 B
PHP

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