---
title: 'Inspect Laravel routes and middleware with route:list'
description: 'Run route:list with -v, -vv, and --path to inspect Laravel route names, actions, and middleware in a terminal or LaraBench Artisan mode.'
canonical_url: 'https://larabench.com/laravel-tinker-workflows/inspect-laravel-routes-and-middleware'
md_url: 'https://larabench.com/laravel-tinker-workflows/inspect-laravel-routes-and-middleware.md'
last_updated: '2026-07-28'
---
# Inspect Laravel routes and middleware with route:list

> Run route:list with -v, -vv, and --path to inspect Laravel route names, actions, and middleware in a terminal or LaraBench Artisan mode.

## Direct Answer

Run `php artisan route:list` for the full route table. Add `-v` to show middleware, `-vv` to expand groups, and `--path=api` to limit output to API paths.

## When To Use This

Use this when a route returns 404, an endpoint has the wrong middleware, a route name is missing, or a deployment appears to use a different route table.

## Terminal Approach

```bash
php artisan route:list
php artisan route:list -v
php artisan route:list -vv
php artisan route:list -vv --path=api
php artisan route:list --except-vendor
```

## LaraBench Approach

Open Run Code, switch to Artisan, run `route:list -vv --path=api`, and inspect the method, URI, name, action, and middleware. Save the command when the same filter is useful later.

## Saved Command

```bash
route:list -vv --path={path}
```

## Expected Result

The output lists matching methods, URI patterns, names, controller actions, and middleware. With `-vv`, middleware groups are expanded.

## Troubleshooting

- If no routes match, remove `--path` and confirm the URI prefix.
- If the command fails while booting, inspect that exception first.
- If output differs from your checkout, confirm the selected connection and deployed release.

## Safety Notes

`route:list` does not change application data, but the app still boots to build the table, so service-provider boot code runs.

## Related Sources

- [Laravel route listing documentation](https://laravel.com/docs/13.x/routing#the-route-list)
- [Laravel middleware documentation](https://laravel.com/docs/13.x/middleware)
- [LaraBench Artisan commands docs](https://larabench.com/docs/basic-usage/artisan-commands)

## Related Workflows

- [Run Laravel Tinker over SSH](https://larabench.com/laravel-tinker-workflows/run-laravel-tinker-over-ssh)
- [Inspect Laravel config and service container bindings](https://larabench.com/laravel-tinker-workflows/inspect-laravel-config-and-services)

## Canonical Page

- [HTML page](https://larabench.com/laravel-tinker-workflows/inspect-laravel-routes-and-middleware)
- [Markdown mirror](https://larabench.com/laravel-tinker-workflows/inspect-laravel-routes-and-middleware.md)

## Glossary

- [Laravel workflow glossary](https://larabench.com/docs/reference/glossary)

## Sitemap

See the full [sitemap](https://larabench.com/sitemap.md) for all public pages.
