From f8423451c31215bfa83d0cd319ff3d016a83bdb3 Mon Sep 17 00:00:00 2001 From: JUNO_OKYO Date: Wed, 17 Mar 2021 01:27:50 +0700 Subject: [PATCH] Added "exclude-path" option --- src/Illuminate/Foundation/Console/RouteListCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Foundation/Console/RouteListCommand.php b/src/Illuminate/Foundation/Console/RouteListCommand.php index 46fbf5ff6256..c9844c6d81ce 100644 --- a/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -187,6 +187,7 @@ protected function filterRoute(array $route) { if (($this->option('name') && ! Str::contains($route['name'], $this->option('name'))) || $this->option('path') && ! Str::contains($route['uri'], $this->option('path')) || + $this->option('exclude-path') && Str::contains($route['uri'], $this->option('exclude-path')) || $this->option('method') && ! Str::contains($route['method'], strtoupper($this->option('method')))) { return; } @@ -259,6 +260,7 @@ protected function getOptions() ['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method'], ['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name'], ['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path'], + ['exclude-path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by exclude path'], ['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'], ];