From e8de5cb3ef4f0f4b8e10e1fbaf31a2b2d72990c8 Mon Sep 17 00:00:00 2001 From: Antonio Carlos Ribeiro Date: Fri, 25 Jun 2021 02:01:12 +0200 Subject: [PATCH 1/2] 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. --- src/Illuminate/Foundation/Console/RouteListCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/RouteListCommand.php b/src/Illuminate/Foundation/Console/RouteListCommand.php index 8a24c5dfb8bc..2c18bacaeb60 100644 --- a/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -91,7 +91,7 @@ protected function getRoutes() return $this->getRouteInformation($route); })->filter()->all(); - if ($sort = $this->option('sort')) { + if (($sort = $this->option('sort')) !== 'resolution') { $routes = $this->sortRoutes($sort, $routes); } @@ -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 (resolution, domain, method, uri, name, action, middleware) to sort by', 'uri'], ]; } } From 76438e401c370719dd457c9a2d21a3bc3059a5ee Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 25 Jun 2021 08:31:41 -0500 Subject: [PATCH 2/2] rename option --- src/Illuminate/Foundation/Console/RouteListCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/RouteListCommand.php b/src/Illuminate/Foundation/Console/RouteListCommand.php index 2c18bacaeb60..2f0725edfa7a 100644 --- a/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -91,7 +91,7 @@ protected function getRoutes() return $this->getRouteInformation($route); })->filter()->all(); - if (($sort = $this->option('sort')) !== 'resolution') { + if (($sort = $this->option('sort')) !== 'precedence') { $routes = $this->sortRoutes($sort, $routes); } @@ -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 (resolution, 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'], ]; } }