我有以下内容:
{!! Form::model($houses, ['method' => 'PATCH','route' => ['houses.update', $houses->id]]) !!}
和{!! Form::open(array('route' => 'houses.store','method'=>'POST')) !!}
<form method="POST" action="http://localhost/j/public_html/houses/2" accept-charset="UTF-8">
和<form method="POST" action="http://localhost/j/public_html/houses" accept-charset="UTF-8">
如何在两者中添加<form id="houseform" ...
?
由于
答案 0 :(得分:2)
您可以使用:
{!! Form::model($houses, [
'method' => 'PATCH',
'route' => ['houses.update', $houses->id],
'id' => 'houseform'
]) !!}
类似于第二名:
{!! Form::open(array('route' => 'houses.store','method'=>'POST', 'id' => 'houseform')) !!}