在Laravel 5.4中安装debugbar后出现错误

时间:2018-08-14 15:39:25

标签: php laravel

我正在使用laravel 5.4,这是我的composer.json。

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "barryvdh/laravel-debugbar": "~2.4",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
}

}

这是一个新的Laravel项目。我不知道为什么我跑步

composer require barryvdh/laravel-debugbar:~2.4

并在app \ config中添加服务提供商

Barryvdh\Debugbar\ServiceProvider::class,

我的项目因错误而损坏

1/1) FatalErrorException

找不到“ DebugBar \ DebugBar”类。

我在这里缺少什么吗? 我的开发环境是使用Homestead + ubuntu。

0 个答案:

没有答案