Laravel 5: Enable laravel-debugbar

前端 未结 12 1619
星月不相逢
星月不相逢 2020-12-23 14:19

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:

12条回答
  •  情书的邮戳
    2020-12-23 14:34

    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.

提交回复
热议问题