If you desire to use the HTML package in Laravel 5, installing it is a simple process. A group of developers in the Laravel community formed a repository called the Laravel collective, where the packages that have been removed from Laravel are maintained. To install the HTML package, simple use the composer
command to add the package to the application as follows:
$ composer require laravelcollective/html
This will install the HTML package and the composer.json
will show you the package added to the require
section as follows:
"require": { "laravel/framework": "5.0.*", "laravelcollective/html": "~5.0", },
At this point, the package is installed.
Now, we need to add the HTMLServiceProvider
to the list of providers in the config/app.php
file:
'providers' => [ ... 'CollectiveHtmlHtmlServiceProvider', ... ],
Lastly, the Form
and Html
aliases need to be added to the config/app.php
file, as shown here:
'aliases' => [ ... 'Form' => 'CollectiveHtmlFormFacade', 'Html' => 'CollectiveHtmlHtmlFacade', ... ],