=5.5.9", "laravel/framework": "5.1.*", "barryvdh/laravel-ide-helpe">
当前位置:Gxlcms > PHP教程 > laravel5.1安装laravel-debugbar出现问题

laravel5.1安装laravel-debugbar出现问题

时间:2021-07-01 10:21:17 帮助过:23人阅读

composer中设置

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "barryvdh/laravel-ide-helper":"^2.1",
        "barryvdh/laravel-debugbar": "^2.1"
    },

config/app.php中providers设置

/*
*Third-party  Service Providers
*/
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Barryvdh\Debugbar\ServiceProvider::class,

然后打开首页是空白,不报错

找到问题了,自己写的一个Provider写的有问题,导致不报错了

回复内容:

composer中设置

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "barryvdh/laravel-ide-helper":"^2.1",
        "barryvdh/laravel-debugbar": "^2.1"
    },

config/app.php中providers设置

/*
*Third-party  Service Providers
*/
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Barryvdh\Debugbar\ServiceProvider::class,

然后打开首页是空白,不报错

找到问题了,自己写的一个Provider写的有问题,导致不报错了

如果是全新安装的话, 请首先检查storage目录是否有写权限?

话说, provider后面的那个alias是干啥的, 一般安装包时要修改两处. 又有的安装包不需要::class, 这有啥区别?

providers 加 'Barryvdh\Debugbar\ServiceProvider',
aliases 加'Debugbar' => 'Barryvdh\Debugbar\Facade',

人气教程排行