Skip to content

Conversation

@jasonmccreary
Copy link
Contributor

@jasonmccreary jasonmccreary commented Nov 16, 2025

This adds a --middleware option to filter the route:list output by middleware. This can be a single middleware class name or a middleware group name. Like the other filters, it is a simple string contains check. So partial searches are accepted.

php artisan route:list --middleware=api php artisan route:list --middleware=ThrottleRequests

Note, to filter by middleware within a middleware group, you may need to increase the verbosity with the -v or -vv option - just as you would to display middleware in the output.

php artisan route:list -vv --middleware='App\Http\Middleware\ForcePageCache'
@jasonmccreary jasonmccreary force-pushed the middleware-filter branch 3 times, most recently from 7487a88 to f9d6dd6 Compare November 16, 2025 21:30
@taylorotwell taylorotwell merged commit fa96878 into laravel:12.x Nov 16, 2025
66 checks passed
@jasonmccreary jasonmccreary deleted the middleware-filter branch November 17, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants