air-petr / laravel-find-route-handler
An Artisan command to find the handler behind any route in your Laravel application.
v1.0.1
2025-04-17 13:56 UTC
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-06-17 14:34:07 UTC
README
An Artisan command to find the handler (controller or closure) behind any route in your Laravel application.
📦 Installation
composer require air-petr/laravel-find-route-handler --dev
If you're not using Laravel Package Auto-Discovery, you may need to manually register the service provider:
// config/app.php 'providers' => [ // ... AirPetr\LaravelFindRouteHandler\RouteFindHandlerServiceProvider::class, ],
🚀 Usage
Use the route:find-handler
command to locate the code behind a specific route.
php artisan route:find-handler GET /hello
Output example:
[✔] Handler found: App\Http\Controllers\HelloController@index
Or, for a route with a closure:
[✔] Handler found in routes/web.php on line 42
🛠Supported Features
- ✅ Supports
GET
,POST
,PUT
,DELETE
, and other HTTP methods - ✅ Works with route closures and controller actions
- ✅ Supports route groups and middleware
🥪 Testing
vendor/bin/phpunit
🙌 Contributing
Contributions are welcome! Feel free to submit issues or pull requests.
📄 License
MIT