Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report

barryvdh/laravel-debugbar v3.12.0

PHP Debugbar integration for Laravel
Package summary
Share
0
issues
0
licenses
Package created
5 Sep 2013
Version published
12 Mar 2024
Maintainers
1
Total deps
0
Direct deps
0
License
MIT
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does barryvdh/laravel-debugbar do?

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.

How do you use barryvdh/laravel-debugbar?

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.

Where are the barryvdh/laravel-debugbar docs?

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.