I\'m trying to add the HtmlServiceProvider with Laravel 5.
I keep getting the following error:
FatalErrorException in compiled.php line 6391:
Run this in cmd
php artisan Illuminate\Html
and then add variables in app.php
The error indicates it can't find the service provider so make sure you do a composer update. If you did do a composer update check your vendor folder to make sure it pulled in the dependency.
Try the following steps Edit your project's composer.json file.
"require": {
"laravelcollective/html": "~5.0"
}
Next, update Composer from the Terminal:
composer update
Next, add your new provider to the providers array of config/app.php:
'providers' => [ // ... 'Collective\Html\HtmlServiceProvider', // ... ],
Finally, add two class aliases to the aliases array of config/app.php:
'aliases' => [
// ...
'Form' => 'Collective\Html\FormFacade',
'Html' => 'Collective\Html\HtmlFacade',
// ...
],
Double check when Updating your composer, whether you're in the right directory
You can also use like this
Illuminate\Html\HtmlServiceProvider::class,
and
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
For use laravel html helper you need to require dependency in composer.json file and use namespance.For full process follow my blog. http://www.kingpabel.com/laravel-html-helper/