lukasss93 / laravel-route-debug
Print the route name and action in the response headers.
Fund package maintenance!
Lukasss93
Requires
- php: ^8.1
- illuminate/contracts: ^10.0|^11.0
- illuminate/http: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0
This package is auto-updated.
Last update: 2024-04-21 08:32:57 UTC
README
Laravel Route Debug
A simple package that prints the current route name and action in the Response Headers.
🚀 Installation
You can install the package using composer
composer require lukasss93/laravel-route-debug --dev
Then add the service provider to config/app.php
.
This step can be skipped if package auto-discovery is enabled.
'providers' => [ Lukasss93\Laravel\RouteDebug\RouteDebugServiceProvider::class, ];
⚙ Publishing the config file
Publishing the config file is optional:
php artisan vendor:publish --provider="Lukasss93\Laravel\RouteDebug\RouteDebugServiceProvider" --tag="route-debug-config"
Config content:
return [ 'enabled' => env('APP_DEBUG', false), ];
👓 Usage
Enable the package turning on the APP_DEBUG
environment variable or by setting the enabled
config option to true
.
Then, when you visit a page, you will see the route name and action in the response headers.
Screenshot
⚗️ Testing
composer test
🔰 Version Support
Package | L8.x | L9.x | L10.x | L11.x |
---|---|---|---|---|
^1.0 | ✅ | ✅ | ✅ | ❌ |
^2.0 | ❌ | ❌ | ✅ | ✅ |
Package | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | PHP 8.3 |
---|---|---|---|---|---|
^1.0 | ✅ | ✅ | ✅ | ✅ | ✅ |
^2.0 | ❌ | ❌ | ✅ | ✅ | ✅ |
📃 Changelog
Please see the CHANGELOG.md for more information on what has changed recently.
🏅 Credits
📖 License
Please see the LICENSE.md file for more information.