implement GRIDs

This commit is contained in:
2018-08-01 22:19:30 +02:00
parent 8988df93fd
commit 755c65a42d
12 changed files with 203 additions and 37 deletions
+4 -2
View File
@@ -4,12 +4,13 @@
@php
/** @var object[] $columns */
/** @var \App\Models\Row[]|array[][] $rows */
/** @var \App\Models\Row[] $rows */
@endphp
<table class="table table-hover table-sm">
<thead>
<tr>
<th>#GRID</th>
@foreach($columns as $col)
<th>{{ $col->title }}</th>
@endforeach
@@ -18,8 +19,9 @@
<tbody>
@foreach($rows as $row)
<tr>
<td>{{ $row->data->_grid }}</td>
@foreach($columns as $col)
<td data-id="{{ $row->id }}">{{ $row['data']->{$col->name} }}</td>
<td data-id="{{ $row->id }}">{{ $row->data->{$col->name} }}</td>
@endforeach
</tr>
@endforeach