我正在使用Laravel框架开发应用程序。当我尝试从firefox浏览器加载应用程序(http://localhost/laravel/public/)时,出现以下错误:
C:\ wamp \ www \ laravel \ vendor \ laravel \ framework \ src \ Illuminate \ Foundation \ ProviderRepository.php第150行中的FatalErrorException:未找到类'Illuminate \ Broadcasting \ BroadcastServiceProvider' < / p>
我尝试通过以下几个解决方案解决这个问题,但我无法离开。
我的composer.json文件组件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": { "php": ">=5.5.9", "laravel/framework": "5.1.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0", "phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": ["database"],
"psr-4": {"App\\": "app/"}
},
"autoload-dev": {"classmap": ["tests/TestCase.php"]},
"scripts": {
"post-install-cmd": ["php artisan clear-compiled","php artisan optimize"],
"pre-update-cmd": ["php artisan clear-compiled"],
"post-update-cmd": ["php artisan optimize"],
"post-root-package-install": ["php -r \"copy('.env.example', '.env');\"" ],
"post-create-project-cmd": ["php artisan key:generate"]
},
"config": {"preferred-install": "dist"},
"require": {"illuminate/html": "5.*","laravel/framework": "5.0.*"}
}
你的帮助会让我摆脱这种困境。
答案 0 :(得分:1)
你应该运行
composer install --no-dev --no-scripts
然后
composer install --no-dev -o