Skip to content

Commit

Permalink
Add "resolution" order to route:list command (#37824)
Browse files Browse the repository at this point in the history
* Add "resolution" order to route:list command

This can be handy when debugging resolution problems, as we can see routes in the exact order they will be resolved.

* rename option

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
antonioribeiro and taylorotwell authored Jun 25, 2021
1 parent ef420d1 commit 32f21da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function getRoutes()
return $this->getRouteInformation($route);
})->filter()->all();

if ($sort = $this->option('sort')) {
if (($sort = $this->option('sort')) !== 'precedence') {
$routes = $this->sortRoutes($sort, $routes);
}

Expand Down Expand Up @@ -269,7 +269,7 @@ protected function getOptions()
['path', null, InputOption::VALUE_OPTIONAL, 'Only show routes matching the given path pattern'],
['except-path', null, InputOption::VALUE_OPTIONAL, 'Do not display the routes matching the given path pattern'],
['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'],
['sort', null, InputOption::VALUE_OPTIONAL, 'The column (domain, method, uri, name, action, middleware) to sort by', 'uri'],
['sort', null, InputOption::VALUE_OPTIONAL, 'The column (precedence, domain, method, uri, name, action, middleware) to sort by', 'uri'],
];
}
}

0 comments on commit 32f21da

Please sign in to comment.