我尝试使用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">×</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>
答案 0 :(得分:0)
也许是由于</form action="{{route('petambak.store)}}" method="post">
之后的错对对引号引起的问题petambak.store
?
localhost
也仅在您的计算机上可用