Support the ongoing development of Laravel.io →
Database Views Blade
Last updated 2 years ago.
0
Solution

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>
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mikelovely mikelovely Joined 26 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.