Html code to show the data

 avatar
unknown
html
3 years ago
419 B
5
Indexable
<style>
  table, th, td {
    border: 1px solid black;
  }
</style>

<table>
  <thead>
  <tr>
    <th></th>
    @foreach($months as $month)
      <th>{{ $month }}</th>
    @endforeach
  </tr>
  </thead>
  <tbody>
  @foreach($items as $item)
    <tr>
      <td>{{ $item['year'] }}</td>
      @foreach($item['months'] as $value)
        <td>{{ $value }}</td>
      @endforeach
    </tr>
  @endforeach
  </tbody>
</table>
Editor is loading...