【问题标题】:Class 'Class 'Form' not found' in fresh installation [duplicate]全新安装中未找到类'类'表单'[重复]
【发布时间】:2019-09-17 20:55:25
【问题描述】:

刚刚从 Magento 扩展的 Laraval 完全是新的,我被困在了开始阶段。我在 php 7.2.2 ubuntu 上运行 Laravel 6。

当我在下面的代码创建视图时出现问题。

**但是因为我运行的是 Laravel 6,所以它给出了错误。

知道如何解决这个问题吗?提前致谢。**

@foreach ($members as $member)
    <tr>
        <td>{{ ++$i }}</td>
        <td>{{ $member->name}}</td>
        <td>{{ $member->email}}</td>
        <td>
            <a class="btn btn-info" href="{{ route('members.show',$member->id) }}">Show</a>
            <a class="btn btn-primary" href="{{ route('members.edit',$member->id) }}">Edit</a>
            {!! Form::open(['method' => 'DELETE','route' => ['members.destroy', $member->id],'style'=>'display:inline']) !!}
            {!! Form::submit('Delete', ['class' => 'btn btn-danger']) !!}
            {!! Form::close() !!}
        </td>
    </tr>
    @endforeach

为此我找到了https://laraveldaily.com/class-form-not-found-in-laravel-5/

【问题讨论】:

  • 确保你已经通过这个命令安装了它composer require laravelcollective/html
  • 首先您需要搜索一下有关 laravel 集体的信息,它不是一日学习框架。

标签: php laravel-6


【解决方案1】:

你需要先从作曲家安装laravel collective 通过运行这个命令

composer require laravelcollective/html

更多信息,您可以查看Docs

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-09
    • 2023-03-23
    • 1970-01-01
    • 2017-11-30
    • 2014-05-14
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    相关资源
    最近更新 更多