I have a button that calls a modal form where user can change their group name. I want to pass the id into the form {!! Form::open(['action' => [ 'ContactsController@update', id]]) !!}. I tried using the same way that I passed value to group name input using jquery but can't work.
Button code:
{{ Form::button('<i class="material-icons">dvr</i>', ['type' => 'button', 'class' => 'btn btn-warning btn-link btn-just-icon edit_btn', 'data-toggle'=>'modal', 'data-name'=>"$group_contact->group_name" 'data-id'=>"$group_contact->id", 'data-target'=>'#editGroupModal'] ) }}
Modal form code:
{!! Form::open(['action' => [ 'ContactsController@update', ???],'method' => 'POST', 'class' => 'form-horizontal']) !!}
<div class="form-group bmd-form-group">
<input type="hidden" name="eventId" id="eventId"/>
<span id="idHolder"></span>
{{Form::label('group_name','',['class' => 'bmd-label-floating', 'placeholder' => 'Enter group name'])}}
{{Form::text('group_name','',['class' => 'form-control', 'autocomplete'=>'off'])}}
</div>
<div class="modal-footer">
{{Form::submit('Update', ['class'=>'btn btn-primary'])}}
</div>
{!! Form::close() !!}
Update Controller:
public function update(Request $request, $id)