Skip to content

Commit 687b9e1

Browse files
authored
Add files via upload
1 parent 0dfbfe1 commit 687b9e1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
require_once __DIR__ . '/../Modelo/ReportesProductosMasVendidosService.php';
3+
4+
class ReportesProductosMasVendidosController {
5+
private $reportesProductosMasVendidosService;
6+
7+
public function __construct() {
8+
$this->reportesProductosMasVendidosService = new ReportesProductosMasVendidosService();
9+
}
10+
11+
public function manejarPeticion() {
12+
// Obtener límite si se envía por GET
13+
$limite = isset($_GET['limite']) ? intval($_GET['limite']) : 10;
14+
15+
// Obtener productos más vendidos
16+
$productos = $this->reportesProductosMasVendidosService->obtenerProductosMasVendidos($limite);
17+
18+
// Cargar vista
19+
require __DIR__ . '/../Vista/ReportesProductosMasVendidosIndex.php';
20+
}
21+
}
22+
?>

0 commit comments

Comments
 (0)