| @@ 28-45 (lines=18) @@ | ||
| 25 | /** |
|
| 26 | * Execute the console command. |
|
| 27 | */ |
|
| 28 | public function handle() |
|
| 29 | { |
|
| 30 | if (count($this->routes) == 0) { |
|
| 31 | $this->error("Your application doesn't have any routes."); |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | ||
| 35 | $locale = $this->argument('locale'); |
|
| 36 | ||
| 37 | if ( ! $this->isSupportedLocale($locale)) { |
|
| 38 | $this->error("Unsupported locale: '{$locale}'."); |
|
| 39 | return; |
|
| 40 | } |
|
| 41 | ||
| 42 | $this->routes = $this->getFreshApplicationRoutes($locale); |
|
| 43 | ||
| 44 | $this->displayRoutes($this->getRoutes()); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Boot a fresh copy of the application and get the routes. |
|
| @@ 29-45 (lines=17) @@ | ||
| 26 | /** |
|
| 27 | * Execute the console command. |
|
| 28 | */ |
|
| 29 | public function handle() |
|
| 30 | { |
|
| 31 | if (empty($this->router->getRoutes())) { |
|
| 32 | return $this->error("Your application doesn't have any routes."); |
|
| 33 | } |
|
| 34 | ||
| 35 | $locale = $this->argument('locale'); |
|
| 36 | ||
| 37 | if ( ! $this->isSupportedLocale($locale)) { |
|
| 38 | $this->error("Unsupported locale: '{$locale}'."); |
|
| 39 | return; |
|
| 40 | } |
|
| 41 | ||
| 42 | $this->routes = $this->getFreshApplicationRoutes($locale); |
|
| 43 | ||
| 44 | $this->displayRoutes($this->getRoutes()); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Compile the routes into a displayable format. |
|