I have a form with multiple html table in my view. How do I get all data from the html table to my controller by request. The following code is my view.
<table id="mastertree-table" class="table table-bordred table-striped">
<thead>
<th style="">Id</th>
<th>Introducer Id</th>
<th>Reference ID</th>
<th>Amount</th>
<th>Calculation</th>
<th style="text-align: right;">Percentage</th>
<th style="text-align: right;">Value</th>
</thead>
<tbody>
@foreach($TreePayroll as $row)
{!! Form::open(array('method'=>'POST', 'route' => array('payroll.update',$approveMasterPayroll[0]->EmpId, $approveMasterPayroll[0]->FYId), 'class' => 'form-horizontal', 'id' => 'payroll-form')) !!}
<tr>
<td style="width: 80px; height: 5px">{!! Form::text('PHId',$row->PHId, ['class'=>'form-control', 'readonly', 'style'=>'text-align:right;']) !!}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="width: 100px; height: 5px">{!! Form::text('Rate',$row->Rate, ['class'=>'form-control', 'readonly', 'style'=>'text-align:right;']) !!}</td>
@if($row->CalcId == 2)
<td style="width: 150px; height: 5px">{!! Form::text('Value',$row->Value, ['class'=>'form-control', 'style'=>'text-align:right;']) !!}</td>
@else
<td style="width: 150px; height: 5px">{!! Form::text('Value',$row->Value, ['class'=>'form-control', 'readonly', 'style'=>'text-align:right;']) !!}</td>
@endif
</tr>
{!! Form::close() !!}
@endforeach
</tbody>
</table>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire