/** * Scan the routes and write the scanned routes file. * * @return void */ protected function scanRoutes() { if (empty($this->scan)) { return; } $scanner = new Scanner($this->scan); file_put_contents($this->app->getScannedRoutesPath(), '<?php ' . $scanner->getRouteDefinitions()); }
/** * Get the route definitions for the annotations. * * @return string */ protected function getRouteDefinitions() { $provider = 'Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider'; return '<?php ' . PHP_EOL . PHP_EOL . Scanner::create($this->laravel->getProvider($provider)->scans())->getRouteDefinitions() . PHP_EOL; }