Skip to content

Commit f842345

Browse files
committed
Added "exclude-path" option
1 parent 9f986ce commit f842345

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Illuminate/Foundation/Console/RouteListCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ protected function filterRoute(array $route)
187187
{
188188
if (($this->option('name') && ! Str::contains($route['name'], $this->option('name'))) ||
189189
$this->option('path') && ! Str::contains($route['uri'], $this->option('path')) ||
190+
$this->option('exclude-path') && Str::contains($route['uri'], $this->option('exclude-path')) ||
190191
$this->option('method') && ! Str::contains($route['method'], strtoupper($this->option('method')))) {
191192
return;
192193
}
@@ -259,6 +260,7 @@ protected function getOptions()
259260
['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method'],
260261
['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name'],
261262
['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path'],
263+
['exclude-path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by exclude path'],
262264
['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'],
263265
['sort', null, InputOption::VALUE_OPTIONAL, 'The column (domain, method, uri, name, action, middleware) to sort by', 'uri'],
264266
];

0 commit comments

Comments
 (0)