feat(entry): filter out replaced variants in EntryResource to improve data accuracy

This commit is contained in:
2026-09-16 09:55:28 -03:00
parent 69bea10519
commit e6b5da366c

View File

@@ -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,
];
}