I\'m using Laravel 5 and would like to use the barryvdh/laravel-debugbar. After the installation and configuration the bar is not showing.
I did the following:
Try this command
php artisan config:clear
In my case, the problem was I had a wide route, Route::get('/{all?}','...')
catching the debugbar one.
I managed to solve this by adding these routes before:
Route::get( '/api/_debugbar/assets/stylesheets', '\Barryvdh\Debugbar\Controllers\AssetController@css' );
Route::get( '/api/_debugbar/assets/javascript', '\Barryvdh\Debugbar\Controllers\AssetController@js' );
The installation instructions at https://github.com/barryvdh/laravel-debugbar#installation recommend setting the application debug mode to true. Also make sure, that you do not disable the debugbar in config/debugbar.php by setting the enabled=false > If I were you I would simply remove it. ( The debugbar won't work, event if the application itself is in debug mode )
Another suggestion
As far as I know the .env.example file should be renamed to .env and all apropriate variables should be set. In my case it always contains lines like this:
APP_ENV=local
APP_DEBUG=true`
Within the config/app.php file the debug value should be read from the environment variable.
return [
/* some other config values here... */
'debug' => env('APP_DEBUG'),
]
Note, that it should also be possible to simply set the value to true without using the environment based configuration values.
Maybe you can test it by manually calling \Debugbar::enable(); in one of your routes and debugging afterwards.
Hope this helps.
to add debugger in your code step 1
composer require barryvdh/laravel-debugbar --dev
inside config/app.php
Barryvdh\Debugbar\ServiceProvider::class
,'Debugbar' => Barryvdh\Debugbar\Facade::class
,at last run this command
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
I had the same issue and tried all the previous solutions without success. Finnaly I solved my problem with the following detail fix:
Install instrucions:
If you use a catch-all/fallback route, make sure you load the Debugbar ServiceProvider before your own App ServiceProviders.
Check your storage/laravel.log file. In mine was:
local.ERROR: Debugbar exception: Authentication user provider [] is not defined.
Because I misconfigured something in auth.php and when I fixed that debugbar loaded successfully.