From e6b5da366cd028a5ac9f0c139ce86e4b9611e15e Mon Sep 17 00:00:00 2001 From: ncoronel Date: Wed, 16 Sep 2026 09:55:28 -0300 Subject: [PATCH] feat(entry): filter out replaced variants in EntryResource to improve data accuracy --- app/Domains/FiestaFutbolInfantil/Resources/EntryResource.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Domains/FiestaFutbolInfantil/Resources/EntryResource.php b/app/Domains/FiestaFutbolInfantil/Resources/EntryResource.php index 5fe7fd3..8df1b7b 100644 --- a/app/Domains/FiestaFutbolInfantil/Resources/EntryResource.php +++ b/app/Domains/FiestaFutbolInfantil/Resources/EntryResource.php @@ -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, ]; }