@@ -12,7 +12,7 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * Create a new engine instance. |
| 14 | 14 | * |
| 15 | - * @param TeamTNT\TNTSearch\TNTSearch $tnt |
|
| 15 | + * @param TNTSearch $tnt |
|
| 16 | 16 | * |
| 17 | 17 | * @return void |
| 18 | 18 | */ |
@@ -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()); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function filters(Builder $builder) |
| 126 | 126 | { |
| 127 | - return collect($builder->wheres)->map(function ($value, $key) { |
|
| 127 | + return collect($builder->wheres)->map(function($value, $key) { |
|
| 128 | 128 | return $key.'='.$value; |
| 129 | 129 | })->values()->all(); |
| 130 | 130 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | )->get()->keyBy($model->getKeyName()); |
| 149 | 149 | |
| 150 | 150 | if (count($models) !== 0) { |
| 151 | - return collect($results['ids'])->map(function ($hit) use ($models) { |
|
| 151 | + return collect($results['ids'])->map(function($hit) use ($models) { |
|
| 152 | 152 | return $models[$hit]; |
| 153 | 153 | }); |
| 154 | 154 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register() |
| 17 | 17 | { |
| 18 | - $this->app[EngineManager::class]->extend('tntsearch', function () { |
|
| 18 | + $this->app[EngineManager::class]->extend('tntsearch', function() { |
|
| 19 | 19 | $tnt = new TNTSearch(); |
| 20 | 20 | $tnt->loadConfig(config('scout.tntsearch')); |
| 21 | 21 | |