报错内容
[SymfonyComponentDebugExceptionFatalErrorException] Call to undefined method IlluminateFoundationApplication::bindShared()
查了一下,大概是说Laravel5.1后,illuminate/html 已经被废弃了,可以使用 laravelcollective/html 来替换
首先删除 illuminate/html在config/app.php 中添加的配置
'IlluminateHtmlHtmlServiceProvider' 'Form' => 'IlluminateHtmlFormFacade', 'HTML' => 'IlluminateHtmlHtmlFacade
然后执行以下命令移除illuminate/html
composer remove illuminate/html
composer update
成功后,使用新的Package来替换,执行以下命令
composer require laravelcollective/html
同样,将以下配置项添加到 illuminate/html在config/app.php 中
# providers CollectiveHtmlHtmlServiceProvider::class, # aliases 'Form'=>CollectiveHtmlFormFacade::class, 'Html'=>CollectiveHtmlHtmlFacade::class,
OK。