- How do I install Pretty Routes in a Laravel application?
- Install it with Composer using composer require andrey-helldar/pretty-routes. Laravel's package auto-discovery registers the service provider, so you normally do not need to edit config/app.php manually. Publish the package config if you want to change the UI path or middleware, then open the routes page in your browser.
- Does Pretty Routes support Laravel 13?
- Yes. Release 3.9.0 is an additive compatibility update that declares support for Laravel 13. Before relying on it, confirm the constraint in composer.json and check whether the package's CI matrix actually runs tests against Laravel 13. For applications on older Laravel versions this should behave as a routine dependency update.
- Which Laravel and PHP versions does Pretty Routes support?
- Supported versions are defined by the package's composer.json constraints, and 3.9.0 extends that range to Laravel 13. You should verify the PHP version bounds and the tested framework combinations rather than assuming support from a changelog line alone. If your project supports several Laravel versions, test the oldest and newest combinations you ship.
- Is Pretty Routes safe to enable in production?
- The package exposes your route URIs, names, methods, and middleware, which is internal application detail you may not want publicly reachable. Most teams enable it only in local or staging environments, or protect the UI with authentication middleware, a gate check, or an IP allowlist. If you do enable it in production, review the config and routing exposure carefully first.
- How do I change the URL path or middleware for the Pretty Routes interface?
- Publish the package configuration file and edit the route path and middleware entries, then clear your config cache. Changing the path lets you move the UI off a predictable URL, and changing middleware lets you attach web, auth, or custom access-control middleware. Re-run the config cache command after any change so the new values take effect.
- Can I search and filter routes by URI, name, middleware, or HTTP method?
- Yes, that is the core purpose of the package. The web interface lets you browse the full route list and narrow it by HTTP method, URI, route name, or middleware without scrolling through raw console output. This is especially useful in large applications with hundreds of routes where finding a single endpoint by eye is slow.
- Is there an Artisan command for listing routes with Pretty Routes?
- Yes. The package ships an Artisan command alongside the web interface, so you can print a readable, filterable route table directly in your terminal. This is handy over SSH or inside scripts and CI jobs where opening a browser is not practical. Run the package's command and pass the available filtering options to narrow the output.
- How do I restrict who can access the Pretty Routes web interface?
- Add authentication or authorization middleware to the package's middleware config so only authenticated or privileged users can reach the UI. You can also register a gate check, apply an IP allowlist at the web server level, or disable the route entirely in production. Combining environment checks with middleware gives you a safer default than relying on an obscure URL.
- Does Pretty Routes work when routes are cached with route:cache?
- The package reads the application's registered routes, so it reflects whatever Laravel currently has loaded, including a cached route collection. In local development you should clear the route cache after adding or changing routes so the UI shows the current state. Routes registered dynamically at runtime by other packages may not always appear as you expect, so verify the list if something is missing.
- What are the alternatives to Pretty Routes for inspecting Laravel routes?
- Laravel's built-in php artisan route:list already prints a route table and supports basic filtering, and tools such as Laravel Telescope or Debugbar cover broader debugging needs. Pretty Routes is aimed specifically at a browsable, searchable web UI plus a dedicated Artisan command, which is most valuable for large route sets. Compare against the built-in command first if you only need a quick terminal listing.