feat: refactor product variant handling to use product pricing and remove unnecessary fields
This commit is contained in:
@@ -18,10 +18,7 @@ class ProductVariantResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'producto_id' => $this->producto_id,
|
||||
'slug' => $this->slug,
|
||||
'nombre' => $this->nombre,
|
||||
'descripcion' => $this->descripcion,
|
||||
'precio' => $this->precio,
|
||||
'stock' => $this->stock,
|
||||
'product' => ProductResource::make($this->whenLoaded('product')),
|
||||
'definitions' => ProductVariantDefinitionResource::collection($this->whenLoaded('definitions')),
|
||||
'images' => $this->whenLoaded('attachments', function () {
|
||||
|
||||
Reference in New Issue
Block a user