@@ -191,6 +191,14 @@ protected function filterRoute(array $route)
191
191
return ;
192
192
}
193
193
194
+ if ($ this ->option ('except-path ' )) {
195
+ foreach (explode (', ' , $ this ->option ('except-path ' )) as $ path ) {
196
+ if (Str::contains ($ route ['uri ' ], $ path )) {
197
+ return ;
198
+ }
199
+ }
200
+ }
201
+
194
202
return $ route ;
195
203
}
196
204
@@ -258,7 +266,8 @@ protected function getOptions()
258
266
['json ' , null , InputOption::VALUE_NONE , 'Output the route list as JSON ' ],
259
267
['method ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by method ' ],
260
268
['name ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by name ' ],
261
- ['path ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by path ' ],
269
+ ['path ' , null , InputOption::VALUE_OPTIONAL , 'Only show routes matching the given path pattern ' ],
270
+ ['except-path ' , null , InputOption::VALUE_OPTIONAL , 'Do not display the routes matching the given path pattern ' ],
262
271
['reverse ' , 'r ' , InputOption::VALUE_NONE , 'Reverse the ordering of the routes ' ],
263
272
['sort ' , null , InputOption::VALUE_OPTIONAL , 'The column (domain, method, uri, name, action, middleware) to sort by ' , 'uri ' ],
264
273
];
0 commit comments