Hi all how to get selected radio button value. I want to store values on my table where selected radio button.
My Controller code passing to View $result
$result = DB::table('table')
->where('name', $name)
->where('code', $code)
->get();
return View::make('home.search_result')
->with('result', $result);
In my view code I had radio button.
{{ Form::open(array('action' => 'BookingController@postValue', 'class'=>'well', 'method' => 'GET')) }}
<table id="search" class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Code</th>
</tr>
</thead>
<tbody>
@foreach($result as $result)
<tr class="success">
<td>{{ Form::radio('result') }}
<td>{{ $result->name}}</td>
<td>{{ $result->code}}</td>
</tr>
@endforeach
</tfoot>
</table>
{{ Form::submit('Add', array('class' => 'btn btn-info')) }}
{{ Form::close() }}
So I try to pass chechked radio button value to my postValue function when I click Add button.