There is this way to remove attached route middleware (not global middleware) from a particular route, taken from the https://laravel.com/docs/10.x/middleware#excluding-middleware: Route::get('/profile', function () { //... })->withoutMiddleware([MyCustomMiddleware::class]); There's also this way which is not documented, but appears to work: Route::group(['prefix' => 'prefix', 'excluded_middleware' => ['api']], function () { Route::get('/profile', function () { //... }); }); On previous versions of Laravel, route middleware was displayed automatically using: php artisan route:list Currently, at least on laravel/framework version v9.52.4 the middleware is hidden by default. It is possible to display it using verbose or for short -v option: php artisan route:list -v In case you do not know it, the --path option is quite handy, combined with the above: php artisan route:list --path user -v
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners