barryvdh/laravel-debugbar
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
illuminate/routing | v11.7.0 | - | MIT | prod | |
illuminate/session | v11.7.0 | - | MIT | prod | |
illuminate/support | v11.7.0 | - | MIT | prod | |
maximebf/debugbar | v1.22.3 | 274.17 kB | MIT | prod | |
symfony/finder | v7.0.7 | - | MIT | prod dev |
The barryvdh/laravel-debugbar is a PHP package used to integrate PHP Debug Bar with Laravel for development purposes. The package registers the debugbar and attaches it to the output, allowing developers to see important debug information about their Laravel application in real time. This includes details about queries, routes, views, events, and many other configurable collectors. However, it is advisable to only use the debugbar during development in a secure environment because it could leak sensitive data from stored requests, and potentially slow down the application.
The barryvdh/laravel-debugbar package can be used by requiring it via composer for development. To install the package, the following code is used:
composer require barryvdh/laravel-debugbar --dev
In Laravel environments with auto-discovery, no more setup is required for the service provider to be registered. However, in environments without auto-discovery, the service provider has to be manually added to the providers array in config/app.php:
Barryvdh\Debugbar\ServiceProvider::class,
Similarly, if you want to use the facade for logging messages, add this to your facades in app.php:
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
For further configuration, you can publish the vendor using the following command:
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
Once installed and configured, you can add messages, start/stop timing, log exceptions, and do much more with the Debugbar, for instance:
Debugbar::info($object);
Debugbar::startMeasure('rendering', 'Time for rendering');
// Display various line of code...
Debugbar::stopMeasure('rendering');
Remember, Debugbar should be enabled only when APP_DEBUG is set to true
.
The documentation for the barryvdh/laravel-debugbar is available at http://phpdebugbar.com/docs/. Provides detailed instructions and examples on how to configure and use the package, as well as more advance use cases.