datatable.directory codebase https://datatable.directory/
 
 
 
 
 
 
datatable.directory/resources/views/table/_rows.blade.php

23 lines
451 B

{{--
args: $rows, $cols
--}}
<table class="table table-hover table-sm">
<thead>
<tr>
@foreach($columns as $col)
<th>{{ $col->title }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach($rows as $row)
<tr>
@php($rdata = json_decode($row['data'], true))
@foreach($columns as $col)
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>