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
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Transform the resource into an array.
|
|
|
|
|
*
|
|
|
|
|
* @param \Illuminate\Http\Request
|
|
|
|
|
* @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,
|
2019-03-13 11:17:52 +00:00
|
|
|
'swatch_value' => $this->swatch_value
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|