diff --git a/app/Http/Controllers/Api/ProductoController.php b/app/Http/Controllers/Api/ProductoController.php index e196fa0..57f27fd 100644 --- a/app/Http/Controllers/Api/ProductoController.php +++ b/app/Http/Controllers/Api/ProductoController.php @@ -30,7 +30,7 @@ class ProductoController extends Controller */ public function show(Producto $producto) { - return $producto; + return new ProductoResource($producto); } } diff --git a/app/Http/Resources/ProductoResource.php b/app/Http/Resources/ProductoResource.php index b0210f3..5177696 100644 --- a/app/Http/Resources/ProductoResource.php +++ b/app/Http/Resources/ProductoResource.php @@ -20,10 +20,12 @@ class ProductoResource extends JsonResource '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_caliacxs' => $this->apto_caliacxs + 'apto_celiacxs' => $this->apto_celiacxs ]; } } diff --git a/database/migrations/2020_09_23_173620_create_productos_table.php b/database/migrations/2020_09_23_173620_create_productos_table.php index 420a077..eac8c87 100644 --- a/database/migrations/2020_09_23_173620_create_productos_table.php +++ b/database/migrations/2020_09_23_173620_create_productos_table.php @@ -24,7 +24,7 @@ class CreateProductosTable extends Migration $table->foreignId('imagen_id')->nullable(); $table->text('descripcion')->nullable(); $table->boolean('apto_veganxs')->nullable(); - $table->boolean('apto_caliacxs')->nullable(); + $table->boolean('apto_celiacxs')->nullable(); $table->timestamps(); }); } diff --git a/resources/csv/barrios.csv b/resources/csv/barrios.csv index 33b9a3d..6d43920 100644 --- a/resources/csv/barrios.csv +++ b/resources/csv/barrios.csv @@ -18,6 +18,7 @@ PEÑAROL|OESTE||| LAS PIEDRAS|OESTE||| A.C.T.E.O|OESTE||| NUEVO PARIS|OESTE||| +SANTA CATALINA|OESTE||| BELVEDERE|OESTE||| BATLLE BERRES|OESTE||| CERRO PTI|OESTE||| @@ -34,6 +35,7 @@ CIUDAD VIEJA|SUR||| COOP EJIDO|SUR||| COVIREUS|SUR||| LA BLANQUEADA|SUR||| +NITEP|SUR||| LA CURVA|SUR||| PANADERIA VIDAL|SUR||| SUA|SUR|||