Laravel 6 Form class not found - Solution
If you are fetch error class 'form' not found in laravel 6 then i will help you how to solve form class not found error in laravel 6. i will give you solution for laravel 6, laravel 5.8, laravel 5.7, laravel 5.6 and laravel 5.5 using laravelcollective/html package.
Sometime you just copy and paste some other project code then you will found this types of error because of you forgot to use laravelcollective/html composer package that other guys used. But i will help you how to solve this error in laravel 6.
laravelcollective/html is provide very easy way to use html textbox, select box, radio button, checkbox etc with laravel. They provide several method to use those input fields. I will also suggest to use form class in your project because it helps to quick code.
Bellow Screen shot of error:
You will find bellow all laravel framework version solution, so let's see bellow solution.
Solution for Laravel 6
composer require laravelcollective/html
Solution for Laravel 5.8
composer require laravelcollective/html
Solution for Laravel 5.7
composer require laravelcollective/html
Solution for Laravel 5.6
composer require "laravelcollective/html":"^5.8.0"
In app.php file
'providers' => [
...
Collective\Html\HtmlServiceProvider::class,
...
],
'aliases' => [
...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
...
],
Solution for Laravel 5.5
composer require "laravelcollective/html":"^5.4.0"
In app.php file
'providers' => [
...
Collective\Html\HtmlServiceProvider::class,
...
],
'aliases' => [
...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
...
],
I hope it can help you...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- Laravel 6 Call to undefined function str_slug() - Solved
- Laravel 6 Ajax Request Example
- Laravel 6 Multiple Image Upload Tutorial
- Laravel 6 Ajax Form Validation Tutorial
- Laravel 6 Authentication Tutorial
- Laravel 6 Form Validation with Error Messages
- Laravel 6 Ajax Autocomplete Search from Database
- Laravel 6 Image Upload Tutorial