Download the PHP package onamfc/laravel-route-visualizer without Composer
On this page you can find all versions of the php package onamfc/laravel-route-visualizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onamfc/laravel-route-visualizer
More information about onamfc/laravel-route-visualizer
Files in onamfc/laravel-route-visualizer
Package laravel-route-visualizer
Short Description A comprehensive route visualization package for Laravel applications
License MIT
Informations about the package laravel-route-visualizer
Laravel Route Visualizer
A comprehensive route visualization package for Laravel applications that provides an interactive web interface to explore, analyze, and export your application's routing structure with advanced validation and multiple visualization options.
Features
- Interactive Route Explorer: Web-based dashboard with advanced search and filtering
- Network Graph Visualization: Interactive network graphs using Vis.js for route relationships
- Tree View: Hierarchical visualization of route structure organized by prefixes
- Advanced Filtering: Filter by HTTP methods, middleware, middleware groups, controllers, domains, namespaces, and more
- Route Validation: Automatic detection of duplicate routes, missing controllers, and missing methods
- Export Capabilities: Export filtered route data to HTML, JSON, or SVG formats
- Performance Optimized: Built-in caching, pagination, and lazy loading for large route sets
- Security Aware: Hide sensitive routes in production environments
- Customizable: Configurable visualization options, and multiple templates
- Copy to Clipboard: One-click copying of route URIs and controller actions
- Laravel Telescope Integration: Direct links to route performance data when Telescope is installed
Requirements
- PHP ^8.1
- Laravel ^10.0|^11.0|^12.0
Installation
Install the package via Composer:
The package will automatically register itself via Laravel's auto-discovery feature.
Quick Installation
Use the install command to publish all necessary files:
This command will publish the configuration file, views, and assets in one step.
Manual Installation
If you prefer to publish files individually:
Publish Configuration
Publish Views (Optional)
If you want to customize the views:
Publish Assets (Optional)
If you want to serve assets locally:
Configuration
The configuration file config/route-visualizer.php allows you to customize:
Usage
Web Interface
Once installed, visit the route visualizer dashboard:
The dashboard provides:
- Overview Statistics: Total routes, controllers, middleware, domains, namespaces, and validation issues
- Advanced Search & Filtering: Real-time search with filters for methods, middleware, domains, namespaces, and more
- Multiple View Modes:
- List View: Detailed tabular view with pagination and copy-to-clipboard functionality
- Graph View: Interactive network visualization using Vis.js
- Tree View: Hierarchical visualization organized by route structure
- Route Validation: Visual indicators for duplicate routes, missing controllers, and missing methods
- Export Options: Download filtered route data in various formats
- Telescope Integration: Direct links to route performance data (when available)
Artisan Commands
Install Package
Install and publish all package files:
Export Routes
Export your route structure to static files with advanced filtering:
Programmatic Usage
You can also use the route scanner programmatically:
API Endpoints
The package provides several API endpoints:
GET /route-visualizer/routes- Get filtered route data with paginationGET /route-visualizer/graph- Get network graph data for Vis.jsGET /route-visualizer/tree-data- Get hierarchical tree dataPOST /route-visualizer/clear-cache- Clear route cache
Query Parameters
Filter routes using query parameters:
Customization
Custom Views
After publishing views, you can customize the dashboard:
Edit the views in resources/views/vendor/route-visualizer/.
Custom Styling
You can customize colors and styling by:
- Publishing the views and modifying the CSS
- Overriding the Tailwind classes in your custom views
- Adding custom CSS to your application's stylesheets
Custom Export Templates
Create custom export templates by extending the base export view:
Network Visualization
The package uses Vis.js for interactive network graphs that show relationships between routes and controllers. The visualization provides:
- Interactive node dragging and zooming
- Color-coded nodes for different types (controllers vs routes)
- Validation status indicators (errors in red, warnings in yellow)
- Hover tooltips with detailed information
Security Considerations
Production Usage
The visualizer is automatically disabled in production environments. To enable it:
Sensitive Routes
Configure patterns to hide sensitive routes:
Access Control
Add authentication middleware:
Performance
Caching
Enable caching for better performance with large route sets:
Pagination
The package includes built-in pagination and lazy loading:
Memory Usage
For applications with thousands of routes, consider:
- Enabling route caching
- Using pagination in the web interface
- Filtering routes at the scanner level
- Using the export functionality for static analysis
Validation Features
The package automatically validates your routes and identifies:
- Duplicate Routes: Routes with identical URIs and HTTP methods
- Missing Controllers: Routes pointing to non-existent controller classes
- Missing Methods: Routes pointing to non-existent controller methods
Configure validation in your config file:
Laravel Telescope Integration
When Laravel Telescope is installed, the visualizer automatically adds direct links to route performance data:
Testing
Run the package tests:
The package includes comprehensive feature and unit tests covering:
- Route scanning and data extraction
- API endpoints and filtering
- Export functionality
- Validation features
- Graph data generation
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This package is open-sourced software licensed under the MIT license.
All versions of laravel-route-visualizer with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0