@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $myQuery = clone $this->query; |
| 85 | 85 | // if its a normal query ( no union, having and distinct word ) |
| 86 | 86 | // replace the select with static text to improve performance |
| 87 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 87 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 88 | 88 | $row_count = $this->connection->getQueryGrammar()->wrap('row_count'); |
| 89 | 89 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
| 90 | 90 | } |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | foreach ((array) $this->getQueryBuilder()->joins as $key => $join) { |
| 416 | 416 | $joins[] = $join->table; |
| 417 | 417 | } |
| 418 | - if (! in_array($table, $joins)) { |
|
| 418 | + if (!in_array($table, $joins)) { |
|
| 419 | 419 | $this->getQueryBuilder() |
| 420 | 420 | ->leftJoin($table, $foreign, '=', $other) |
| 421 | 421 | ->orderBy($orderBy, $direction); |
@@ -216,8 +216,8 @@ discard block |
||
| 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 | }); |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | if (! in_array($table, $joins)) { |
| 417 | 417 | $this->getQueryBuilder() |
| 418 | - ->leftJoin($table, $foreign, '=', $other); |
|
| 418 | + ->leftJoin($table, $foreign, '=', $other); |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | return $column; |