Laravel 6 Form class not found - Solution

By Hardik Savani November 5, 2023 Category : Laravel

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...

Shares