With Laravel 5, many inbuilt components that were part of core framework has been removed and are been managed independently as Laravel Collective. So If you are having an old version web application built in Laravel and if you are trying to move it into newer version you might get following error / exceptions.
- Class ‘Form’ not found
- FatalErrorException Call to undefined function link_to()
Or even if you are building a new Laravel Application with new version you might want to take advantage of some good inbuilt function that Laravel Collective Package provides. Here is how you install it.
Step 1. Add Dependency in composer.json
Go to your composer.json file of project and add following dependency inside require section.
Go yo your terminal and run
composer update or
composer update laravelcollective/html (To download the specific package).
Step 2 Add the Form and HTML facades and service provider.
Edit file app/config/app.php and add this line to providers array
Add the following aliases to aliases array in the same file.
‘Html’ => Collective\Html\HtmlFacade::class,