Skip to content

Commit

Permalink
Added "exclude-path" option
Browse files Browse the repository at this point in the history
  • Loading branch information
J2TEAM committed Mar 16, 2021
1 parent 9f986ce commit f842345
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Foundation/Console/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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'],
];
Expand Down

0 comments on commit f842345

Please sign in to comment.