I am new to laravel. I am trying to send javascript data to controller. In my view I have listed records using bootstrap table. When the user check the table row checkbox I want it's id to get store in the a variable and when the user click the add button it should send the id to the controller html code
<div class="col-md-12" >
<table class="table table-hover" data-toggle="table" id="table"
data-click-to-select="true">
<thead>
<tr>
<th data-field="state" data-checkbox="true" ></th>
<th data-field="roomname">Room Name</th>
<th data-field="Desc">Description</th>
<th data-field="price">Price</th>
<th data-field="roomid" data-visible="false">Price</th>
</tr>
</thead>
<tbody >
@foreach($roomname as $value)
<tr>
<td>{!! $value->roomid !!}</td>
<td>{!! $value->roomname !!}</td>
<td>{!! $value->Desc !!}</td>
<td>{!! $value->price !!}</td>
<td >{!! $value->roomid !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="col-md-12">
<br>
<button id="add_cart" class="btn btn-warning">Proceed to booking</button>
</div>