Debugging output with Laravel Debugbar

Debugging Logging

Committed to the LaraBrain by: wjgilmore (@wjgilmore) at October 16, 2015 2:44 pm

Easily view log messages in the browser alongside your web application

The Laravel Debugbar is an indispensable tool for debugging Laravel applications. You can send log messages directly to the Messages tab in the Debugbar interface using the following syntax:

\Debugbar::info("Some log message");

When the controller action containing this statement is executed, the output will be sent to your Debug bar's Messages tab. Keep in mind that in order to use this particular feature you'll need to add the Debugbar facade to the config/app.php providers array:

'aliases' => [
    ...
    'Debugbar' => Barryvdh\Debugbar\Facade::class,
]