public function bootstrap(Application $app) { $routeFileName = $app->appPath() . DIRECTORY_SEPARATOR . 'routes.php'; if (file_exists($routeFileName)) { require $routeFileName; } }
/** * @param Application $app */ public function bootstrap(Application $app) { $finder = new Finder(); $iterator = $finder->files()->name("*.php")->depth(0)->in($app->configPath()); $config = new Repository(); $app->instance('config', $config); foreach ($iterator as $file) { if ($file instanceof SplFileInfo) { $realPath = $file->getRealPath(); $config->set(basename($realPath, ".php"), require $realPath); } } }