In fact, it's better to use the façade, because the façade also introduces namespaces, so it's not good to introduce namespaces into every debug place.
Laravel-debugbar provides a global function, located in/vendor/barryvdh/laravel-debugbar/src/helpers.php, that has been defined in the Composer.json of the component for automatic loading, Therefore, you can use help functions directly, such as printing info-level log information:
Debugbar ()->info ($data);
It would be nice to call this directly.
Look at the function definition:
if (!function_exists (' Debugbar ')) {
/**
* Get the Debugbar instance
*
* @return \barryvdh\debugbar\laraveldebugbar
*/
function Debugbar ()
{
Return app (' Debugbar ');
}
}
Print the message as shown in the figure:
Laravel-debugbar is a good debugging tool, hosting the PSR-3 specification on the level of the definition of log messages, in the development can be a good use of this tool to improve the efficiency of development, debugging.