@@ -216,8 +216,8 @@ |
||
| 216 | 216 | $myQuery = clone $this->query; |
| 217 | 217 | $myQuery->orWhereHas($relation, function ($q) use ($column, $keyword, $query) { |
| 218 | 218 | $sql = $q->select($this->connection->raw('count(1)')) |
| 219 | - ->where($column, 'like', $keyword) |
|
| 220 | - ->toSql(); |
|
| 219 | + ->where($column, 'like', $keyword) |
|
| 220 | + ->toSql(); |
|
| 221 | 221 | $sql = "($sql) >= 1"; |
| 222 | 222 | $query->orWhereRaw($sql, [$keyword]); |
| 223 | 223 | }); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $myQuery = clone $this->query; |
| 94 | 94 | // if its a normal query ( no union, having and distinct word ) |
| 95 | 95 | // replace the select with static text to improve performance |
| 96 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 96 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 97 | 97 | $row_count = $this->connection->getQueryGrammar()->wrap('row_count'); |
| 98 | 98 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
| 99 | 99 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $columnDef = $this->columnDef['filter'][$columnName]; |
| 126 | 126 | // check if global search should be applied for the specific column |
| 127 | 127 | $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false; |
| 128 | - if (! $applyGlobalSearch) { |
|
| 128 | + if (!$applyGlobalSearch) { |
|
| 129 | 129 | continue; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $columns = $this->request->get('columns', []); |
| 298 | 298 | |
| 299 | 299 | foreach ($columns as $index => $column) { |
| 300 | - if (! $this->request->isColumnSearchable($index)) { |
|
| 300 | + if (!$this->request->isColumnSearchable($index)) { |
|
| 301 | 301 | continue; |
| 302 | 302 | } |
| 303 | 303 | |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $keyword = $this->getSearchKeyword($index); |
| 338 | 338 | $caseInsensitive = $this->isCaseInsensitive(); |
| 339 | 339 | |
| 340 | - if (! $caseInsensitive) { |
|
| 340 | + if (!$caseInsensitive) { |
|
| 341 | 341 | $column = strstr($column, '(') ? $this->connection->raw($column) : $column; |
| 342 | 342 | } |
| 343 | 343 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $pivotPK = $model->getForeignKey(); |
| 472 | 472 | $pivotFK = $model->getQualifiedParentKeyName(); |
| 473 | 473 | |
| 474 | - if (! in_array($pivot, $joins)) { |
|
| 474 | + if (!in_array($pivot, $joins)) { |
|
| 475 | 475 | $this->getQueryBuilder()->leftJoin($pivot, $pivotPK, '=', $pivotFK); |
| 476 | 476 | } |
| 477 | 477 | |
@@ -480,14 +480,14 @@ discard block |
||
| 480 | 480 | $tablePK = $related->getForeignKey(); |
| 481 | 481 | $tableFK = $related->getQualifiedKeyName(); |
| 482 | 482 | |
| 483 | - if (! in_array($table, $joins)) { |
|
| 483 | + if (!in_array($table, $joins)) { |
|
| 484 | 484 | $this->getQueryBuilder()->leftJoin($table, $pivot . '.' . $tablePK, '=', $tableFK); |
| 485 | 485 | } |
| 486 | 486 | } else { |
| 487 | 487 | $table = $model->getRelated()->getTable(); |
| 488 | 488 | $foreign = $model->getQualifiedForeignKey(); |
| 489 | 489 | $other = $model->getQualifiedOtherKeyName(); |
| 490 | - if (! in_array($table, $joins)) { |
|
| 490 | + if (!in_array($table, $joins)) { |
|
| 491 | 491 | $this->getQueryBuilder()->leftJoin($table, $foreign, '=', $other); |
| 492 | 492 | } |
| 493 | 493 | } |