@@ -49,25 +49,25 @@ protected function execute(InputInterface $input, OutputInterface $output)
4949 $ app = $ this ->app ;
5050
5151 $ this ->io ->title ("Generate routes " );
52- $ routePaths = array_reverse ($ this ->ci ->locator ->findResources ('routes:// ' , true , true ));
53- $ routeDirCount =count ($ routePaths );
54- $ routeCount =0 ;
52+ $ routePaths = array_reverse ($ this ->ci ->locator ->findResources ('routes:// ' , true , true ));
53+ $ routeDirCount =count ($ routePaths );
54+ $ routeCount =0 ;
5555 foreach ($ routePaths as $ path ) {
5656 $ routeFiles = glob ($ path . '/*.php ' );
5757 foreach ($ routeFiles as $ routeFile ) {
58- $ routeCount += 1 ;
59- //$this->io->writeln("<info>$routeFile</info>");
58+ $ routeCount += 1 ;
59+ //$this->io->writeln("<info>$routeFile</info>");
6060 require_once $ routeFile ;
6161 }
6262 }
6363
64- $ allRoutes = $ app ->getContainer ()->get ('router ' )->getRoutes ();
65- foreach ($ allRoutes as $ route ) {
66- $ p = $ route ->getPattern ();
67- foreach ($ route ->getMethods () as $ m )
68- $ this ->io ->writeln ($ m .' ' .$ p );
69- }
64+ $ allRoutes = $ app ->getContainer ()->get ('router ' )->getRoutes ();
65+ foreach ($ allRoutes as $ route ) {
66+ $ p = $ route ->getPattern ();
67+ foreach ($ route ->getMethods () as $ m )
68+ $ this ->io ->writeln ($ m .' ' .$ p );
69+ }
7070
71- $ this ->io ->success ("Routes generated from {$ routeCount } files! " );
71+ $ this ->io ->success ("Routes generated from {$ routeCount } files! " );
7272 }
7373}
0 commit comments