Laravel-debugbar: Class 'App\Http\Controllers\Debugbar' not found !

Created on 25 Mar 2015  路  6Comments  路  Source: barryvdh/laravel-debugbar

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.

Most helpful comment

use Barryvdh\Debugbar\Facade as Debugbar;

I solved it like this.

All 6 comments

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 :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alphametric picture alphametric  路  5Comments

coderdiaz picture coderdiaz  路  4Comments

hussein-elhussein picture hussein-elhussein  路  3Comments

hookover picture hookover  路  4Comments

truongthaison picture truongthaison  路  4Comments