Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pretty Routes Laravel Package

dragon-code/pretty-routes

Pretty Routes gives Laravel developers a clean web interface for inspecting registered routes. Browse methods, URIs, names, middleware and controller actions, with search and filtering to quickly find any route—a friendlier alternative to artisan route:list.

View on GitHub
Deep Wiki
Context7

Getting Started

composer require dragon-code/pretty-routes --dev

No service provider registration is needed — package discovery handles it. There is no asset publishing step and nothing to configure in config/; it is essentially a console-output decorator.

First thing to do after install:

php artisan route:list

The package hooks into Laravel's existing route:list command and replaces the stock table with a grouped, tree-style rendering (routes clustered under their controller/action, with method, URI, name, and middleware shown in a more scannable layout). You keep using the same command and the same flags you already know — the difference is purely presentation.

Where to look first:

  1. php artisan route:list --help — confirm which filters the underlying command exposes in your Laravel version, since the package inherits them.
  2. vendor/dragon-code/pretty-routes/src/ — it is a very small codebase; reading the command class tells you exactly which flags it forwards and which it ignores.
  3. composer show dragon-code/pretty-routes — confirm the tagged version and the Laravel/PHP constraints it declares before you adopt it across a team. As of 3.9.0 the declared range includes Laravel 13, so a current app is fine; older pins are not.

First real use case: you've just added a resource controller or a group of API routes and want to eyeball the whole surface — methods, URIs, names, and middleware — in one screen instead of scrolling a 200-row table. Run php artisan route:list and scan the grouped output; it is markedly faster to audit than the default table.

Implementation Patterns

Route-surface review during PRs. The most valuable day-to-day pattern is treating route:list output as a review artifact. Before merging a branch that touches routes/, run the command on both branches and diff the output:

php artisan route:list --no-ansi > /tmp/routes-after.txt
git stash && php artisan route:list --no-ansi > /tmp/routes-before.txt
diff -u /tmp/routes-before.txt /tmp/routes-after.txt

Because the output is grouped by controller, the resulting diff reads like a changelog of your HTTP surface — new endpoints, renamed URIs, dropped actions.

Middleware/auth audits. Scan the grouped view for route groups and check that auth, can:, throttle:, and verified middleware appear where you expect. This is a quick pre-flight before a security review, not a substitute for one.

Onboarding and documentation. A paste of php artisan route:list into a wiki page or a docs/routes.md is a cheap, always-current API map for new team members, and it beats a stale hand-written table.

Scoped runs instead of the full dump. On a large app, always narrow the output:

php artisan route:list --path=api/v1
php artisan route:list --method=POST
php artisan route:list --name=admin.

The prettified layout is most useful when the result set fits on one screen; the flags matter more than the formatting on big apps.

Local-only install. Keep it in require-dev and let CI/production install with --no-dev. This is the intended usage — it is a developer ergonomics package with no runtime role. If your deploy pipeline runs route:list as a smoke test, that step must either run with dev dependencies installed or use the plain framework command.

Pair with route:cache checks. When routes look wrong in a cached environment, run php artisan route:clear && php artisan route:list locally; a mismatch between what you see and what the app serves usually means a stale route cache, not a package problem.

Fallback when output isn't enough. If you need machine-readable data (route inventory dashboards, generated TypeScript clients, coverage checks), don't scrape the pretty output — use Route::getRoutes() directly or Laravel's --json flag where available.

Upgrade path to and past Laravel 13. Because 3.9.0 is the first tag declaring Laravel 13 support, do the framework bump and the package bump in the same PR, then re-run route:list once to confirm the decorator still hooks in and the grouping still renders. If the output silently reverts to the stock table, the version resolution picked an older tag — check composer show.

Gotchas and Tips

Releases are infrequent — pin and verify. The package is maintained, but only just: 3.9.0 was a single community PR adding Laravel 13 compatibility, and there is no committed release cadence. Pin the version in composer.json, and after every framework or PHP upgrade re-check composer show dragon-code/pretty-routes to confirm the tag you have actually supports your platform. Laravel's own route:list has also improved substantially (column selection, --json, -v for middleware detail), so before adopting, check whether the native output in your Laravel version already meets the need — the exit is cheap because the command name is unchanged.

Never parse the output in scripts or CI gates. The formatting includes ANSI colors, box-drawing characters, and controller grouping that will change between versions. Use --json or the Route facade for anything programmatic.

Disable ANSI in CI and when piping to files. Colored, wrapped output in a log file is unreadable and diff-noisy:

php artisan route:list --no-ansi
# or
NO_COLOR=1 php artisan route:list

Terminal width truncation. Long URIs and long middleware chains get clipped or wrapped badly in narrow terminals. Widen the terminal, pipe to a file, or narrow the query with --path/--name rather than fighting the layout.

Vendor routes dominate the list. Packages like Telescope, Horizon, Sanctum, and Nova register dozens of routes. Filter them out with --path or --except-vendor (where supported by your Laravel version) before drawing conclusions about your own surface.

Command collisions. If you already have a custom command or another package that overrides route:list, the decorator may never run. Check php artisan list and app/Console/Commands/ if the output looks unchanged after install.

Middleware display is a summary, not the truth. Grouped output abbreviates middleware. Use -v (verbose) to see the full stack — and remember that route middleware is not the same as global middleware applied via Http/Kernel.

A missing command in production is expected. With --no-dev, route:list still exists (it's framework code) but the pretty rendering won't be present. If a deploy script's output looks different between environments, that's why — not a broken deploy.

Laravel/PHP constraint drift. Laravel 13 is covered as of 3.9.0, but nothing guarantees coverage of the next major, and a release may take a while to land. When Composer starts refusing to install the package after a framework bump, decide quickly between three options: drop the package and use stock route:list, hold the framework upgrade, or pin it with --ignore-platform-req as a short-lived stopgap — never force-install it across a platform mismatch, because the command decorator depends on framework internals that can change silently.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource