feat(entry): filter out replaced variants in EntryResource to improve data accuracy
This commit is contained in:
@@ -16,7 +16,10 @@ class EntryResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'title' => $this->nombre,
|
||||
'description' => $this->descripcion,
|
||||
'variants' => $this->variants->toArray(),
|
||||
'variants' => $this->variants
|
||||
->whereNull('replaced_by_variant_id')
|
||||
->values()
|
||||
->toArray(),
|
||||
'price' => $this->precio,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user