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

27 lines
550 B
PHP
Raw Normal View History

2019-03-13 11:17:52 +00:00
<?php
namespace Webkul\API\Http\Resources\Catalog;
use Illuminate\Http\Resources\Json\JsonResource;
class AttributeOption extends JsonResource
{
2021-10-05 08:56:28 +00:00
2019-03-13 11:17:52 +00:00
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
2021-10-05 08:56:28 +00:00
*
2019-03-13 11:17:52 +00:00
* @return array
*/
public function toArray($request)
{
return [
2020-02-19 11:24:04 +00:00
'id' => $this->id,
'admin_name' => $this->admin_name,
'label' => $this->label,
2021-10-05 08:56:28 +00:00
'swatch_value' => $this->swatch_value,
2019-03-13 11:17:52 +00:00
];
}
2021-10-05 08:56:28 +00:00
2019-03-13 11:17:52 +00:00
}