安装照亮/html后,我的 Blade 引擎运行良好。但是当我通过以下方式安装简单的 qrCode 时:
"require": {
"simplesoftwareio/simple-qrcode": "~1"
}
我收到此错误:
Class 'Illuminate\Html\HtmlServiceProvider' not found
安装后终端的输出,简单的二维码是:
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说明/html
。但我遇到了同样的错误。
最佳答案
您的 composer.json
文件有两个 require
键,如问题中的 Composer 错误中所述:
Key require is a duplicate in ./composer.json at line 53
删除以获得正确格式的composer.json 文件并重试。
关于laravel - 安装简单的二维码后, Blade 引擎无法在 laravel 5 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36895848/