在laravel中找不到类表格 [英] Class form not found in laravel

查看:61
本文介绍了在laravel中找不到类表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

(1/1) FatalErrorException
Class 'Form' not found in kproject.dev/posts/create

我已将这些添加到别名:

I have added these to aliases:

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

并将其添加到提供程序:

And added this to providers:

Collective\Html\HtmlServiceProvider::class,

这是create.blade.php

This is create.blade.php

@extends('layout.app')
@section('content')
    <h1>Create</h1>
    <hr>
    {!!Form::open(['action'=>'postscontroller@store','method'=>'POST']) !!}


    {!! Form::close() !!}
@endsection

推荐答案

我找到了方法,我刚刚添加了此命令composer require laravelcollective/html

i found the way to do this i just added this command composer require laravelcollective/html

只需在终端中使用此命令,它将起作用.您只需要更改json文件即可.

Just use this command in terminal and it will work.You just do not need to alter json file.

这篇关于在laravel中找不到类表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆