diff --git a/src/Laratables.php b/src/Laratables.php index 474dbd6..98aa309 100644 --- a/src/Laratables.php +++ b/src/Laratables.php @@ -144,10 +144,10 @@ private function shouldApplyLimit() protected function tableData($records) { return [ - 'draw' => request('draw') + 1, - 'recordsTotal' => $this->queryHandler->getRecordsCount(), + 'draw' => request('draw') + 1, + 'recordsTotal' => $this->queryHandler->getRecordsCount(), 'recordsFiltered' => $this->queryHandler->getFilteredCount(), - 'data' => $records->toArray(), + 'data' => $records->toArray(), ]; } }