Not quite sure I got your problem, but I think you want something like this:
<table class="table table-striped table-bordered">
<tr>
@foreach(array_keys($payments[0]) as $column_name)
<th><strong>{{ $column_name }}</strong></th>
@endforeach
</tr>
@foreach($payments as $payment)
<tr>
@foreach($payment as $value)
<td>{{ $value }}</td>
@endforeach
</tr>
@endforeach
</table>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community