I tried Laravel Controller Inside Function Make Html Table All are Worked But table body inside i want multiple row so tried this code not worked properly code
$contents = '<table class="border" style="margin-top: 2%">
<thead>
<tr>
<th>SNo</th>
<th>Specification</th>
<th>Description</th>
<th>Qty</th>
<th>UOM</th>
<th>Unit Price</th>
<th>Disc</th>
<th>Net Price</th>
</tr>
</thead>
<tbody>
'.foreach ().'
</tbody>
</table>';
I want this type of code inside the body of table
echo '<tr>
<td>'.$k.'</td>
<td>'.$v->Specification.'</td>
<td>'.$v->Description.'</td>
<td>'.$v->Quantity.'</td>
<td>'.$v->UOM.'</td>
<td>'.$v->Unit_Price.'</td>
<td>'.$v->Discount.'</td>
<td>'.$v->Net_Price.'</td>
</tr>';