public function table() { $r = Input::get('r'); if (empty($r)) { $r = 0; } $f = Input::get('f'); $rc = Input::get('rc'); if (empty($rc)) { $rc = 5; } $arrOrder = Input::get('arrOrder'); if ($arrOrder == null) { $arrOrder = [1]; } $ordDirect = Input::get('ordDirect'); $col = 'parts_category'; $tableRow = PartsCategory::table($col, 'LIKE', $f, $rc, $r, $arrOrder, $ordDirect); $tableRowCount = PartsCategory::tableRowCount($col, 'LIKE', $f); // Galvenās kolonas kods pēc kuras kārto $ordCol = reset($arrOrder); // Izmaina kārtošanas virzienu priekš tabulas $ordDirect = $ordDirect == 0 ? 1 : 0; $data = ['tableRow' => $tableRow, 'tableRowCount' => $tableRowCount, 'rc' => $rc, 'r' => $r, 'direct' => $ordDirect, 'ordCol' => $ordCol]; return view('parts-category.table', $data); }