我在该页面中有一个采购订单页面,该页面显示了来自obat表的数据,并且我希望使用该数据将其选中的复选框放入表采购订单中
这是我的餐桌摆放的东西
<table class="table table-bordered" style="margin-top:20px">
<tbody>
<tr class="text-center">
<th>No</th>
<td>Kode Obat</td>
<td>Nama Obat</td>
<td>Harga</td>
</tr>
@foreach ($obat as $key =>$o)
<tr>
<th class="text-center">
@foreach ($po as $po)
<input type="checkbox" name="select" id="select">
@endforeach
</th>
<td>
<input type="text" class="form-control" value="{{ $o->kode_obat }}">
</td>
<td>
<input type="text" class="form-control" value="{{ $o->nama_obat }}">
</td>
<td>
<input type="text" class="form-control" value="{{ $o->harga_obat }}">
</td>
</tr>
@endforeach
</tbody>
</table>
该复选框(选择)来自表格购买订单,但无法显示。如果我不使用foreach的话