【问题标题】:Syntax error, unexpected 'form' (T_STRING), expecting ')'语法错误,意外的 'form' (T_STRING),期待 ')'
【发布时间】:2019-09-28 21:27:31
【问题描述】:

我尝试使用 Bootstrap 在模态框内创建一个表单,但出现错误。

Facade\Ignition\Exceptions\ViewException 语法错误,意外 'form' (T_STRING),期待 ')' (查看: C:\xampp\htdocs\invuya\resources\views\petambak\index.blade.php)

http://localhost/invuya/public/petambak

这是错误的源代码:

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Form Petambak</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            </form action="{{route('petambak.store)}}" method="post">
            <div class="modal-body">
                <div class="form-group">
                    <label for="name">Nama</label>
                    <input type="text" class="form-control" name="Nama" id="name">
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Simpan</button>
            </div>
        </div>

【问题讨论】:

    标签: laravel-6


    【解决方案1】:

    可能问题出在&lt;/form action="{{route('petambak.store)}}" method="post"&gt; 行中,因为petambak.store 之后的missin 对引用?

    localhost 也只能在您的机器上使用

    【讨论】:

    • 感谢您的帮助。现在可以了,但我还有一个问题,你能帮我处理一下吗
    • @hendry_len 这取决于问题。 IMO 最好发布一个新问题
    • 知道了,我会尽快发布这个问题。感谢您的帮助
    • 要将答案标记为正确,您只需单击绿色检查图像
    猜你喜欢
    • 2017-06-20
    • 1970-01-01
    • 1970-01-01
    • 2019-05-26
    • 1970-01-01
    • 1970-01-01
    • 2013-04-12
    • 2010-11-20
    • 2016-03-05
    相关资源
    最近更新 更多