<table>
    <thead>
    @if(count($header) > 0)
        <tr>
            @foreach($header as $head)
                <th rowspan="{{ $head['row'] }}" colspan="{{ $head['col'] }}">{{ $head['title'] }}</th>
            @endforeach
        </tr>
    @endif
    <tr>
        @foreach($titles as $title)
            <th>{{ $title }}</th>
        @endforeach
    </tr>
    </thead>
    <tbody>
    @foreach($items as $item)
        <tr>
            @foreach($item as $col)
                <td>{{ $col }}</td>
            @endforeach
        </tr>
    @endforeach
    </tbody>
</table>