Skip to content

Commit 3de7613

Browse files
committed
Merge branch 'desarrollo' of https://github.com/PiruloDev/Proyecto into desarrollo
2 parents af42a57 + b7aa621 commit 3de7613

4 files changed

Lines changed: 24 additions & 3 deletions

File tree

Frontend/app/Http/Controllers/Productos/Categoriaproductos.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

99
class Categoriaproductos extends Controller
1010
{
11-
private $apiBaseUrl = 'http://localhost:8080';
11+
protected $baseUrl;
12+
13+
public function __construct()
14+
{
15+
$this->baseUrl = env('API_BASE_URL', 'http://32.193.167.191:8080');
16+
}
1217

1318
public function index()
1419
{

Frontend/app/Http/Controllers/Productos/Menuproductos.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99

1010
class Menuproductos extends Controller
1111
{
12-
private $apiBaseUrl = 'http://localhost:8080';
12+
protected $baseUrl;
1313

14+
public function __construct()
15+
{
16+
// Obtiene la URL base de la API desde el archivo .env
17+
$this->baseUrl = env('API_BASE_URL', 'http://32.193.167.191:8080');
18+
}
1419
public function index()
1520
{
1621
try {

Frontend/app/Http/Controllers/Productos/ProductoController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99

1010
class ProductoController extends Controller
1111
{
12-
protected $apiUrl = 'http://localhost:8080/productos';
12+
protected $baseUrl;
13+
14+
public function __construct()
15+
{
16+
// Obtiene la URL base de la API desde el archivo .env
17+
$this->baseUrl = env('API_BASE_URL', 'http://32.193.167.191:8080');
18+
}
1319

1420
public function index()
1521
{

Frontend/app/Services/Reportes/OrdenSalidaService.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
class OrdenSalidaService {
1010

11+
public function __construct()
12+
{
13+
$this->baseUrl = env('API_BASE_URL', 'http://32.193.167.191:8080');
14+
}
15+
1116
/**
1217
* Obtener todas las ventas/órdenes de salida
1318
*/

0 commit comments

Comments
 (0)