Laravel 5.1 Install laravelcollective/html documentに Laravelcollective/HTML をインストールするときに問題が発生しました。まず、Composer からインストールします。
composer require illuminate/html
メッセージ:
Using version ~5.0 for illuminate/html
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
しかし、これはバージョン 5.0 なので、削除してください。
composer remove illuminate/html
そしてバージョン5.1をインストール
"require": {
"laravelcollective/html": "5.1.*"
}
次に、ターミナルから Composer を更新します。
composer update
次に、config/app.php の providers 配列に新しいプロバイダーを追加します。
'providers' => [
// ...
Collective\Html\HtmlServiceProvider::class,
// ...
],
最後に、config/app.php の aliases 配列に 2 つのクラス エイリアスを追加します。
'aliases' => [
// ...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
// ...
],
そしてメッセージエラー:
FatalErrorException in ProviderRepository.php line 146:
Class 'Collective\Html\HtmlServiceProvider' not found