简体   繁体   中英

Laravel 5.1 adding Form And Html Classes

I am new to Laravel and using Laravel 5.1.

FatalErrorException in 88e08cd08566357f572303974c44bc50 line 4: Class 'Form' not found.

For the above exception I did some changes in my project:

. "require": { 
"php": ">=5.5.9",
 "laravel/framework": "5.1.",
 "laravelcollective/html": "5.1."
 },

Added in JSON and updated the JSON file.

In config/app.php :

'providers' => [ // ... Collective\Html\HtmlServiceProvider::class, // ... ], 

In config/app.php :

'aliases' => [ // ... 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, // ... ], 

I have added this aliases, but it's still showing the above error. Please can anyone help me?

just you have to autoload your composer file.Reason is you added new class to required array in composer.

composer dump-autoload

Source and help for composer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM