group('/ventas', function($app) { $files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'ventas'])); foreach ($files as $file) { if ($file->isDir()) { continue; } include_once $file->getRealPath(); } $app->get('/add', [Ventas::class, 'add']); $app->get('[/]', Ventas::class); }); $app->group('/venta/{proyecto_nombre:[A-za-zÑñ\+\ %0-9]+}/{unidad_descripcion:[0-9]+}', function($app) { $app->get('[/]', [Ventas::class, 'showUnidad']); }); $app->group('/venta/{venta_id:[0-9]+}', function($app) { $app->group('/propietario', function($app) { $app->get('[/]', [Ventas::class, 'propietario']); }); $app->group('/propiedad', function($app) { $app->get('[/]', [Ventas::class, 'propiedad']); }); $app->get('/edit[/]', [Ventas::class, 'edit']); $app->get('[/]', [Ventas::class, 'show']); });