group('/ventas', function($app) { $folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'ventas']); if (file_exists($folder)) { $files = new FilesystemIterator($folder); foreach ($files as $file) { if ($file->isDir()) { continue; } include_once $file->getRealPath(); } } $app->post('[/]', [Ventas::class, 'proyecto']); });