@@ -268,6 +268,7 @@ protected function filterRoute(array $route)
268268 ($ this ->option ('path ' ) && ! Str::contains ($ route ['uri ' ], $ this ->option ('path ' ))) ||
269269 ($ this ->option ('method ' ) && ! Str::contains ($ route ['method ' ], strtoupper ($ this ->option ('method ' )))) ||
270270 ($ this ->option ('domain ' ) && ! Str::contains ((string ) $ route ['domain ' ], $ this ->option ('domain ' ))) ||
271+ ($ this ->option ('middleware ' ) && ! Str::contains ($ route ['middleware ' ], $ this ->option ('middleware ' ))) ||
271272 ($ this ->option ('except-vendor ' ) && $ route ['vendor ' ]) ||
272273 ($ this ->option ('only-vendor ' ) && ! $ route ['vendor ' ])) {
273274 return ;
@@ -500,6 +501,7 @@ protected function getOptions()
500501 ['action ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by action ' ],
501502 ['name ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by name ' ],
502503 ['domain ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by domain ' ],
504+ ['middleware ' , null , InputOption::VALUE_OPTIONAL , 'Filter the routes by middleware ' ],
503505 ['path ' , null , InputOption::VALUE_OPTIONAL , 'Only show routes matching the given path pattern ' ],
504506 ['except-path ' , null , InputOption::VALUE_OPTIONAL , 'Do not display the routes matching the given path pattern ' ],
505507 ['reverse ' , 'r ' , InputOption::VALUE_NONE , 'Reverse the ordering of the routes ' ],
0 commit comments