I have the following:
{!! Form::model($houses, ['method' => 'PATCH','route' => ['houses.update', $houses->id]]) !!}
and {!! Form::open(array('route' => 'houses.store','method'=>'POST')) !!}
witch result in:
<form method="POST" action="http://localhost/j/public_html/houses/2" accept-charset="UTF-8">
and <form method="POST" action="http://localhost/j/public_html/houses" accept-charset="UTF-8">
How do I add an <form id="houseform" ...
in both of them??
Thanks
You can use:
{!! Form::model($houses, [
'method' => 'PATCH',
'route' => ['houses.update', $houses->id],
'id' => 'houseform'
]) !!}
Similar for 2nd:
{!! Form::open(array('route' => 'houses.store','method'=>'POST', 'id' => 'houseform')) !!}