Laravel 8 Class Form not found
In the previous Laravel versions, laravelcollective/html package was installed default. So you didn't need to install deperately. Basically this package makes easy to set value in form inputs.
In the later versions, this pacakge was not default installed. So if you are working in Laravel 6 or higher versions, you need to manually install it. You need to run the below composer command to install laravelcollective/html
package.
composer require laravelcollective/html
In the config/app/php
file, register class in $providers array.
'providers' => [
...
Collective\Html\HtmlServiceProvider::class,
...
],
In the same file add the below lines for $aliases array.
'aliases' => [
...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
...
],
This will allows you to use Form class in balde files.
Copyright 2024 ErrorGram