File tree Expand file tree Collapse file tree
Http/Controllers/Inventario Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ public function index()
3434
3535 // Proveedores y categorías (los que ya tienes)
3636 try {
37- $ proveedores = Http::get ('http://localhost :8080/proveedores ' )->json () ?? [];
38- $ categorias = Http::get ('http://localhost :8080/categorias/ingredientes ' )->json () ?? [];
39- $ unidades = Http::get ('http://localhost :8080/unidades-medida ' )->json () ?? []; // ← nuevo
37+ $ proveedores = Http::get ('http://32.193.167.191 :8080/proveedores ' )->json () ?? [];
38+ $ categorias = Http::get ('http://32.193.167.191 :8080/categorias/ingredientes ' )->json () ?? [];
39+ $ unidades = Http::get ('http://32.193.167.191 :8080/unidades-medida ' )->json () ?? []; // ← nuevo
4040 } catch (\Exception $ e ) {
4141 $ proveedores = $ categorias = $ unidades = [];
4242 }
@@ -69,7 +69,7 @@ public function store(Request $request)
6969 $ request ->validate ([
7070 'idProveedor ' => 'required|integer ' ,
7171 'idCategoria ' => 'required|integer ' ,
72- 'idUnidadMedida ' => 'required|integer ' , // ⬅️ AGREGAR ESTA VALIDACIÓN
72+ 'idUnidadMedida ' => 'required|integer ' ,
7373 'nombreIngrediente ' => 'required|string|max:255 ' ,
7474 'referenciaIngrediente ' => 'required|string|max:50 ' ,
7575 ]);
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ public function index()
2727 $ pedidos = $ response ['success ' ] ? ($ response ['data ' ] ?? []) : [];
2828
2929 try {
30- $ proveedores = Http::get ('http://localhost :8080/proveedores ' )->json () ?? [];
31- $ ingredientes = Http::get ('http://localhost :8080/ingredientes/lista ' )->json () ?? [];
30+ $ proveedores = Http::get ('http://32.193.167.191 :8080/proveedores ' )->json () ?? [];
31+ $ ingredientes = Http::get ('http://32.193.167.191 :8080/ingredientes/lista ' )->json () ?? [];
3232 } catch (\Exception $ e ) {
3333 $ proveedores = [];
3434 $ ingredientes = [];
@@ -102,7 +102,7 @@ public function show(int $id)
102102 $ pedido = $ response ['data ' ];
103103
104104 try {
105- $ proveedores = Http::get ('http://localhost :8080/proveedores ' )->json () ?? [];
105+ $ proveedores = Http::get ('http://32.193.167.191 :8080/proveedores ' )->json () ?? [];
106106 } catch (\Exception $ e ) {
107107 $ proveedores = [];
108108 }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function index()
2626 $ productos = $ this ->productosService ->obtenerProductos ();
2727
2828 try {
29- $ responseIng = Http::get ('http://44.195.189.38 :8080/recetas/lista-modal ' );
29+ $ responseIng = Http::get ('http://32.193.167.191 :8080/recetas/lista-modal ' );
3030 $ ingredientesParaModal = $ responseIng ->successful () ? $ responseIng ->json () : [];
3131 } catch (\Exception $ e ) {
3232 $ ingredientesParaModal = [];
@@ -49,7 +49,7 @@ public function show($idProducto)
4949
5050 // ✅ Cargar ingredientes para el select del modal de edición
5151 try {
52- $ responseIng = Http::get ('http://http://44.195.189.38 :8080/recetas/lista-modal ' );
52+ $ responseIng = Http::get ('http://32.193.167.191 :8080/recetas/lista-modal ' );
5353 $ ingredientes = $ responseIng ->successful () ? $ responseIng ->json () : [];
5454 } catch (\Exception $ e ) {
5555 $ ingredientes = [];
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class CategoriaIngredientesService
1111 public function __construct ()
1212 {
1313 // Obtiene la URL base de la API desde el archivo .env
14- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://44.195.189.38 ' );
14+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191:8080 ' );
1515 }
1616
1717 /**
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class IngredientesService
1212 public function __construct ()
1313 {
1414 // Prioriza la URL del .env, usa localhost:8080 como respaldo
15- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://localhost :8080 ' );
15+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 :8080 ' );
1616 }
1717
1818 /**
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class InventarioService
1111 public function __construct ()
1212 {
1313 // Obtiene la URL base de tu microservicio desde el archivo .env de Laravel
14- $ this ->baseUrl = env ('API_SPRING_URL ' );
14+ $ this ->baseUrl = env ('API_BASE_URL ' , ' http://32.193.167.191:8080 ' );
1515 }
1616
1717 // ===========================================
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class PedidosProveedoresService
1111
1212 public function __construct ()
1313 {
14- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://localhost :8080 ' );
14+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 :8080 ' );
1515 }
1616
1717 protected function getApiClient ()
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class ProduccionService
1212 public function __construct ()
1313 {
1414 // Obtiene la URL base de la API desde el archivo .env
15- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://44.195.189.38 :8080 ' );
15+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 :8080 ' );
1616 }
1717
1818 protected function getApiClient ()
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class ProveedoresService
1212 public function __construct ()
1313 {
1414 // Obtiene la URL base de la API desde el archivo .env
15- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://44.195.189.38 :8080 ' );
15+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 :8080 ' );
1616 }
1717
1818 /**
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class RecetasService
1212
1313 public function __construct ()
1414 {
15- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://44.195.189.38 :8080 ' );
15+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 :8080 ' );
1616 }
1717
1818 protected function getApiClient ()
You can’t perform that action at this time.
0 commit comments