Home >Backend Development >PHP Tutorial >laravel5.1 安装laravel-debugbar出现问题

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

WBOY
WBOYOriginal
2016-06-06 20:15:401629browse

composer中设置

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

config/app.php中providers设置

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

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

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

回复内容:

composer中设置

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

config/app.php中providers设置

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

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

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

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

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

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn