feat: update ProductController and ProductResource to include attribute options in product loading

This commit is contained in:
2026-06-29 15:02:02 -03:00
parent edcb73f748
commit 14f3906ef0
3 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ class ProductResource extends JsonResource
->map(fn ($attachment) => $attachment->getTemporaryUrl(1440))
->values()
),
'variants' => ProductVariantResource::collection($this->whenLoaded('variants')),
'attributes' => AttributeResource::collection($this->whenLoaded('attributes')),
];
}
}