Exception or error:
I am NEW on PHP Laravel6 , i want to make blade view table dynamically..how should i show data in table form with key value pairs data from database? How should i write the blade code foreach loop,with dynamic headings and correspondings rows..
- My Controller code..
public function getDashboardData(){
$sales = ExcelData::all()->toArray();
return view('sales.sales_dashboard',compact('sales'));
}
2.My view blade table code…
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
2. My data coming from databse this formate headings and their coresponding values in array form
data coming from databse keys and values pairs
How to solve: