Split table.view to multiple files

This commit is contained in:
2018-07-29 16:36:49 +02:00
parent ffc5a42252
commit 72ddd75023
4 changed files with 212 additions and 187 deletions
+23
View File
@@ -0,0 +1,23 @@
{{--
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>