Simplificado ProductoResource
This commit is contained in:
parent
b330d991c6
commit
de1bae8620
1 changed files with 2 additions and 7 deletions
|
@ -20,13 +20,8 @@ class ProductoResource extends JsonResource
|
||||||
'nombre' => $this->nombre,
|
'nombre' => $this->nombre,
|
||||||
'precio' => $this->precio,
|
'precio' => $this->precio,
|
||||||
'categoria' => $this->categoria,
|
'categoria' => $this->categoria,
|
||||||
'proveedor' => optional($this->proveedor)->nombre,
|
'economia_solidaria' => $this->es_solidario,
|
||||||
'economia_solidaria' => optional($this->proveedor)->economia_solidaria,
|
'nacional' => $this->es_solidario,
|
||||||
'nacional' => optional($this->proveedor)->nacional,
|
|
||||||
'imagen' => optional($this->poster)->url(),
|
|
||||||
'descripcion' => $this->descripcion,
|
|
||||||
'apto_veganxs' => $this->apto_veganxs,
|
|
||||||
'apto_celiacxs' => $this->apto_celiacxs,
|
|
||||||
'requiere_notas' => $this->requiere_notas,
|
'requiere_notas' => $this->requiere_notas,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue