24 lines
548 B
PHP
24 lines
548 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): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'admin_name' => $this->admin_name,
|
|
'label' => $this->label,
|
|
'swatch_value' => $this->swatch_value,
|
|
];
|
|
}
|
|
} |