From de1bae86203bda73e7e25eb0842eeac645dd97a5 Mon Sep 17 00:00:00 2001 From: ale Date: Thu, 15 May 2025 19:39:17 -0300 Subject: [PATCH] Simplificado ProductoResource --- app/Http/Resources/ProductoResource.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/Http/Resources/ProductoResource.php b/app/Http/Resources/ProductoResource.php index 677af54..bf6eb8f 100644 --- a/app/Http/Resources/ProductoResource.php +++ b/app/Http/Resources/ProductoResource.php @@ -20,13 +20,8 @@ class ProductoResource extends JsonResource 'nombre' => $this->nombre, 'precio' => $this->precio, 'categoria' => $this->categoria, - 'proveedor' => optional($this->proveedor)->nombre, - 'economia_solidaria' => optional($this->proveedor)->economia_solidaria, - 'nacional' => optional($this->proveedor)->nacional, - 'imagen' => optional($this->poster)->url(), - 'descripcion' => $this->descripcion, - 'apto_veganxs' => $this->apto_veganxs, - 'apto_celiacxs' => $this->apto_celiacxs, + 'economia_solidaria' => $this->es_solidario, + 'nacional' => $this->es_solidario, 'requiere_notas' => $this->requiere_notas, ]; }