Download the PHP package projecthanif/routescope without Composer
On this page you can find all versions of the php package projecthanif/routescope. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download projecthanif/routescope
More information about projecthanif/routescope
Files in projecthanif/routescope
Package routescope
Short Description A Laravel package for route debugging and analysis.
License MIT
Informations about the package routescope
RouteScope
A powerful route inspection tool for Laravel developers.
RouteScope gives you instant visibility into your application's routing layer. Stop guessing which routes exist, what middleware they use, or where they're defined. See everything at a glance with an elegant dashboard or query routes programmatically.
Why RouteScope?
🔍 Instant Route Visibility
Ever wondered "Does this route actually exist?" or "What middleware is protecting this endpoint?" RouteScope answers these questions instantly with a clean, organized view of every route in your application.
🎯 Smart Organization
Routes are automatically categorized into API and web routes, making it easy to understand your application's structure at a glance. No more scrolling through php artisan route:list output.
🚀 Developer Productivity
- Debug faster - Quickly identify routing issues and middleware conflicts
- Onboard easier - New team members can explore the API surface in minutes
- Document better - Generate route documentation programmatically
- Refactor confidently - See the full scope of changes when restructuring routes
🛡️ Production-Safe
Built with safety in mind. RouteScope automatically disables itself in production environments and can be installed as a dev dependency to keep your production builds lean.
Installation
Install as a development dependency:
The package auto-registers via Laravel's service provider discovery. No additional setup required!
Quick Start
Visit the dashboard in your browser:
That's it! You'll see all your routes organized, searchable, and ready to explore.
Configuration
Need to customize? Publish the configuration file:
Edit config/routescope.php:
Features
📊 Interactive Dashboard
A beautiful, responsive interface that displays:
- HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Route URIs and named routes
- Controller actions or closure definitions
- Applied middleware chains
- Quick search and filtering
🔌 Programmatic Access
Query routes from your code using the facade or dependency injection:
🎨 Smart Categorization
Routes are automatically organized:
- API Routes: Everything under
/api/* - Web Routes: Your standard web application routes
⚙️ Flexible Filtering
Exclude routes you don't care about:
- Debug tools (Telescope, Ignition)
- Internal Laravel routes
- Third-party package routes
- Custom patterns you define
🔒 Type-Safe
Built with strict typing and comprehensive type hints for a better development experience with IDE autocomplete and static analysis tools.
Usage Examples
View All Routes in a Custom Command
Find Routes with Specific Middleware
Generate API Documentation
Dependency Injection in Controllers
API Reference
RouteScope::getAllRoutes(): array
Returns all routes organized into API and Web categories.
Response Structure:
Environment Variables
Production Safety
RouteScope is designed to be safe by default:
- Auto-disabled in production - The default configuration only enables RouteScope in local/development environments
- Dev dependency - Install with
--devto exclude from production builds - Lightweight - Zero runtime overhead when disabled
- No database - Purely reads from Laravel's route collection
To ensure it's disabled in production, add to .env.production:
Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- Illuminate/Support package
Use Cases
🐛 Debugging
"Why isn't my route working?" - See instantly if the route exists, what middleware is blocking it, and where it's defined.
📚 Documentation
Generate comprehensive route documentation for your team or API consumers programmatically.
👥 Onboarding
New developers can explore your application's API surface without diving into route files.
🔍 Auditing
Quickly identify which routes lack authentication, have duplicate definitions, or use deprecated middleware.
🏗️ Refactoring
When restructuring your application, see the full scope of route changes in one place.
Testing
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Ibrahim Mustapha
- All Contributors
License
The MIT License (MIT). Please see LICENSE.md for more information.
RouteScope - See your routes clearly. Debug confidently. Build faster.
All versions of routescope with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
vlucas/phpdotenv Version ^5.6