@@ -122,8 +122,8 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | protected function isNotEagerLoaded($relation) |
| 124 | 124 | { |
| 125 | - return ! $relation |
|
| 126 | - || ! array_key_exists($relation, $this->query->getEagerLoads()) |
|
| 125 | + return !$relation |
|
| 126 | + || !array_key_exists($relation, $this->query->getEagerLoads()) |
|
| 127 | 127 | || $relation === $this->query->getModel()->getTable(); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $joins[] = $join->table; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - if (! in_array($table, $joins)) { |
|
| 212 | + if (!in_array($table, $joins)) { |
|
| 213 | 213 | $this->getBaseQueryBuilder()->join($table, $foreign, '=', $other, $type); |
| 214 | 214 | } |
| 215 | 215 | |
@@ -184,6 +184,11 @@ |
||
| 184 | 184 | return $table . '.' . $relationColumn; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | + /** |
|
| 188 | + * @param \Illuminate\Database\Eloquent\Model $model |
|
| 189 | + * |
|
| 190 | + * @return false|string |
|
| 191 | + */ |
|
| 187 | 192 | protected function checkSoftDeletesOnModel($model) |
| 188 | 193 | { |
| 189 | 194 | if (in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($model))) { |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | */ |
| 475 | 475 | public function pushToBlacklist($column) |
| 476 | 476 | { |
| 477 | - if (! $this->isBlacklisted($column)) { |
|
| 477 | + if (!$this->isBlacklisted($column)) { |
|
| 478 | 478 | $this->columnDef['blacklist'][] = $column; |
| 479 | 479 | } |
| 480 | 480 | |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | */ |
| 660 | 660 | protected function paginate() |
| 661 | 661 | { |
| 662 | - if ($this->request->isPaginationable() && ! $this->skipPaging) { |
|
| 662 | + if ($this->request->isPaginationable() && !$this->skipPaging) { |
|
| 663 | 663 | $this->paging(); |
| 664 | 664 | } |
| 665 | 665 | } |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | $error = $this->config->get('datatables.error'); |
| 767 | 767 | $debug = $this->config->get('app.debug'); |
| 768 | 768 | |
| 769 | - if ($error === 'throw' || (! $error && ! $debug)) { |
|
| 769 | + if ($error === 'throw' || (!$error && !$debug)) { |
|
| 770 | 770 | throw new Exception($exception->getMessage(), $code = 0, $exception); |
| 771 | 771 | } |
| 772 | 772 | |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | 'recordsTotal' => $this->totalRecords, |
| 778 | 778 | 'recordsFiltered' => 0, |
| 779 | 779 | 'data' => [], |
| 780 | - 'error' => $error ? __($error) : "Exception Message:\n\n".$exception->getMessage(), |
|
| 780 | + 'error' => $error ? __($error) : "Exception Message:\n\n" . $exception->getMessage(), |
|
| 781 | 781 | ]); |
| 782 | 782 | } |
| 783 | 783 | |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | protected function setupKeyword($value) |
| 816 | 816 | { |
| 817 | 817 | if ($this->config->isSmartSearch()) { |
| 818 | - $keyword = '%'.$value.'%'; |
|
| 818 | + $keyword = '%' . $value . '%'; |
|
| 819 | 819 | if ($this->config->isWildcard()) { |
| 820 | 820 | $keyword = Helper::wildcardLikeString($value); |
| 821 | 821 | } |