feat: update ProductController and ProductResource to include attribute options in product loading
This commit is contained in:
@@ -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')),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user