我在resources / views / my-page.blade.php文件中使用了这种laravel形式的语法,并收到以下错误[关闭]

问题描述 投票:-1回答:1

找不到类'FORM'(查看:C:\ xampp \ htdocs \ blog \ resources \ views \ my-page.blade.php)我正在使用laravel 5.8

{{FORM::open(array('action'=>'Controller@method'))}} 
<input type="text" class="form-group" name="name">
<input type="submit" value="submit">
{{FORM::close()}}
laravel forms laravel-5.8
1个回答
0
投票

如果没有使用Laravel Collective软件包,请检查composer.json,否则请转到https://laravelcollective.com/docs/6.0/html并进行安装

安装软件包后,请检查以下内容(如果没有,则添加)

(安装软件包后:::)

在提供程序的配置/应用程序中添加此内容

Collective\Html\HtmlServiceProvider,

和在allias中的config / app中添加此

'Form' => 'Collective\Html\FormFacade',
'Html' => 'Collective\Html\HtmlFacade',

或者您可以在Allias中进行此操作

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,

然后应该没问题让我知道它是否对您有帮助

© www.soinside.com 2019 - 2024. All rights reserved.