add mutators to jsonb columns

This commit is contained in:
2018-07-31 20:32:15 +02:00
parent 7746d85e5f
commit df0e06045f
5 changed files with 13 additions and 6 deletions
+1 -2
View File
@@ -18,9 +18,8 @@
<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>
<td data-id="{{ $row->id }}">{{ $row['data']->{$col->name} }}</td>
@endforeach
</tr>
@endforeach