Hi
I add this line in app.php
'Debugbar' => 'Barryvdh\Debugbar\Facade'
but when I use Debugbar::error('Error!'); in my controller this error occured:
_Class 'App\Http\Controllers\Debugbar' not found_
Also I update composer and Debugbar showed in my app.
\Debugbar::error('Error!');
https://laracasts.com/lessons/namespacing-primer
use Barryvdh\Debugbar\Facade as Debugbar;
I solved it like this.
you can add use Debugbar; on top of your controller
use Debugbar; did not work for me. tanteng's solution did work. Cheers.
tks
I know this is old and all but can someone please explain me why for some people it works just by using use Debugbar; and others not? Are there configs needed? Is it maybe a php version? I have no clue. But it seems in more and more repositories you always seem to get a solution to a problem but never an answer to why :(
Most helpful comment
use Barryvdh\Debugbar\Facade as Debugbar;
I solved it like this.