"require": {
"simplesoftwareio/simple-qrcode": "~1"
}
我收到此错误
Class 'Illuminate\Html\HtmlServiceProvider' not found
安装后的终端输出,简单的qrcode是
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/bin/composer self-update" to get the latest version.
Key require is a duplicate in ./composer.json at line 53
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing illuminate/html (v5.0.0)
- Installing bacon/bacon-qr-code (1.0.1)
Downloading: 100%
- Installing simplesoftwareio/simple-qrcode (1.4.3)
Downloading: 100%
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home/farhad/public_html/letterPanel/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Illuminate\Html\HtmlServiceProvider' not found
Script php artisan optimize handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home/farhad/public_html/letterPanel/laravel/vendor/lara
vel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
我在此错误后也命令composer require illuminate/html
。但我得到同样的错误。
感谢先进的任何帮助
答案 0 :(得分:1)
您在Laravel 5项目上为Laravel 4安装模块。 Html包已从Laravel 5中删除。
你可以寻找另一个包,或者你可以install Html package并使qrcode适应Laravel 5。
答案 1 :(得分:1)
您的composer.json
文件有两个require
个密钥,如您问题中的作曲家错误所述:
密钥要求在第53行的./composer.json中是重复的
删除以获得正确形成的composer.json文件并重试。
答案 2 :(得分:0)
“simpleoftwareio / simple-qrcode”行:“〜1”必须在composer.json中已经存在的“require”内。