照之前的方法composer一个叫illuminate/html的Package,使用中发现不能用,并且composer update的时候会抛出错误:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
原因:
网上查到说5.1以后不支持了,然后就移除illuminate/html在config/app.php中的配置项
providers中的
'Illuminate\Html\HtmlServiceProvider'
aliases中的
'Form' => 'Illuminate\Html\FormFacade',
'HTML' => 'Illuminate\Html\HtmlFacade
再执行
composer remove illuminate/html
composer update
5.1以后用laravelcollective/html 这个package替换了。
composer require laravelcollective/html
在/config/app.php的providers数组中添加下面的这句
Collective\Html\HtmlServiceProvider::class,
在/config/app.php的aliases数组中添加下面的这两句
'Form'=>Collective\Html\FormFacade::class,
'Html'=>Collective\Html\HtmlFacade::class,
Author:leedaning
本文地址:http://blog.csdn.net/leedaning/article/details/72189122