简体   繁体   English

Laravel 5.1添加Form和HTML类

[英]Laravel 5.1 adding Form And Html Classes

I am new to Laravel and using Laravel 5.1. 我是Laravel的新手,并使用Laravel 5.1。

FatalErrorException in 88e08cd08566357f572303974c44bc50 line 4: Class 'Form' not found. 88e08cd08566357f572303974c44bc50第4行中的FatalErrorException:找不到类“ Form”。

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. 在JSON中添加并更新了JSON文件。

In config/app.php : config/app.php

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

In config/app.php : 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 为作曲家提供资料和帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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