feat: implement product creation workflow with variants, attribute definitions, and validation logic

This commit is contained in:
2026-06-29 11:02:04 -03:00
parent 9d3ed17c00
commit 18504594eb
23 changed files with 774 additions and 146 deletions

View File

@@ -0,0 +1,26 @@
<?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,
];
}
}