order by first column

pull/35/head
Ondřej Hruška 6 years ago
parent f42e80cc5d
commit 624963b729
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      app/Http/Controllers/TableController.php

@ -45,7 +45,9 @@ class TableController extends Controller
$columns = Column::columnsFromJson($revision->columns);
$rows = $revision->rowsData($columns)->paginate(25, []);
$rq = $revision->rowsData($columns);
if (count($columns)) $rq = $rq->orderByRaw("data->>'".$columns[0]->id."'");
$rows = $rq->paginate(25, []);
return view('table.view', [
'table' => $tableModel,

Loading…
Cancel
Save