File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
PHP Modulos/controllers/reportescontroller Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 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+ ?>
You can’t perform that action at this time.
0 commit comments