@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function update($models) |
32 | 32 | { |
33 | 33 | $this->initIndex($models->first()); |
34 | - $models->each(function ($model) { |
|
34 | + $models->each(function($model) { |
|
35 | 35 | $searchableFields = $model->toSearchableArray(); |
36 | 36 | |
37 | 37 | $this->tnt->selectIndex("{$model->searchableAs()}.index"); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function delete($models) |
56 | 56 | { |
57 | 57 | $this->initIndex($models->first()); |
58 | - $models->each(function ($model) { |
|
58 | + $models->each(function($model) { |
|
59 | 59 | $this->tnt->selectIndex("{$model->searchableAs()}.index"); |
60 | 60 | $index = $this->tnt->getIndex(); |
61 | 61 | $index->setPrimaryKey($model->getKeyName()); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $results = $this->performSearch($builder); |
91 | 91 | $chunks = array_chunk($results['ids'], $perPage); |
92 | 92 | |
93 | - if(!empty($chunks)) { |
|
93 | + if (!empty($chunks)) { |
|
94 | 94 | if (array_key_exists($page - 1, $chunks)) { |
95 | 95 | $results['ids'] = $chunks[$page - 1]; |
96 | 96 | } else { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | protected function filters(Builder $builder) |
129 | 129 | { |
130 | - return collect($builder->wheres)->map(function ($value, $key) { |
|
130 | + return collect($builder->wheres)->map(function($value, $key) { |
|
131 | 131 | return $key.'='.$value; |
132 | 132 | })->values()->all(); |
133 | 133 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $model->getKeyName(), $keys |
151 | 151 | )->get()->keyBy($model->getKeyName()); |
152 | 152 | |
153 | - return collect($results['ids'])->map(function ($hit) use ($models) { |
|
153 | + return collect($results['ids'])->map(function($hit) use ($models) { |
|
154 | 154 | return $models[$hit]; |
155 | 155 | }); |
156 | 156 | } |