27 lines
585 B
PHP
27 lines
585 B
PHP
<?php
|
|
|
|
namespace App\Domains\Catalog\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/**
|
|
* @mixin \App\Domains\Catalog\Models\AttributeOption
|
|
*/
|
|
class AttributeOptionResource extends JsonResource
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'value' => $this->value,
|
|
'label' => $this->label,
|
|
'sort_order' => $this->sort_order,
|
|
'metadata' => $this->metadata,
|
|
];
|
|
}
|
|
}
|