In Laravel 5 the HTML and Form builder got removed because it shouldn’t be in the core of the framework. I can see their point there, but if you are upgrading your project it would be a lot of work to change all those calls. So I want to get the HTML and form builder back. The Laravel Collective maintains (and improve) packages which are removed from Laravel. The HTML and Form package from them is preferred over the
illuminate/html package, because it’s better maintained. So let’s add their package to our Laravel installation.
- Open up composer.json and add to the require section:
- Open up
config/app.phpand add to the
/* * Package providers */ Collective\Html\HtmlServiceProvider::class,,
- In the same file add to the aliases array:
/* * Package aliases */ 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class,,
composer updatefrom the command line.