lavarel 添加html 和 form 标签

html 和form标签在5.x已经移除,通过以下方式添加


#在composer.json 里添加

"illuminate/html":"~5.0"


#执行更新

composer update "illuminate/html": "5.*"


#修改config/app.php

providers 数组后面添加

'Illuminate\Html\HtmlServiceProvider',


aliases 数组后面添加

'Form' => 'Illuminate\Html\FormFacade',
'Html' => 'Illuminate\Html\HtmlFacade',


By default in Laravel 5.0, Html and Form are not embedded anymore.

Add the following lines in the require section of composer.json file and run composer update"illuminate/html": "5.*"

Register the service provider in config/app.php by adding the following value into the providers array:

'Illuminate\Html\HtmlServiceProvider'

Register facades by adding these two lines in the aliases array:

'Form'=> 'Illuminate\Html\FormFacade','HTML'=> 'Illuminate\Html\HtmlFacade'


参考

laravel.io/forum/09-20-2014-html-form-class-not-found-in-laravel-5

你可能感兴趣的:(lavarel 添加html 和 form 标签)