@@ -30,11 +30,11 @@ |
||
30 | 30 | |
31 | 31 | $searchables = $searchable->getScoutModelsByIds( |
32 | 32 | $builder, collect($results['hits'])->pluck('objectID')->values()->all() |
33 | - )->keyBy(function ($searchable) { |
|
33 | + )->keyBy(function($searchable) { |
|
34 | 34 | return $searchable->getScoutKey(); |
35 | 35 | })->map->getModel(); |
36 | 36 | |
37 | - return collect($results['hits'])->map(function ($hit) use ($searchables) { |
|
37 | + return collect($results['hits'])->map(function($hit) use ($searchables) { |
|
38 | 38 | if (isset($searchables[$hit['objectID']])) { |
39 | 39 | return $searchables[$hit['objectID']]; |
40 | 40 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | foreach ($searchableFinder->fromCommand($this) as $searchable) { |
50 | 50 | $this->output->text(' |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | |
176 | 176 | $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', false); |
177 | 177 | |
178 | - $instance->newQuery()->when($softDeletes, function ($query) { |
|
178 | + $instance->newQuery()->when($softDeletes, function($query) { |
|
179 | 179 | $query->withTrashed(); |
180 | - })->orderBy($instance->getKeyName())->get()->map(function ($model) { |
|
180 | + })->orderBy($instance->getKeyName())->get()->map(function($model) { |
|
181 | 181 | return static::create($model); |
182 | 182 | })->searchable(); |
183 | 183 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | foreach ((new static)->getModels() as $model) { |
194 | 194 | $instance = new $model; |
195 | 195 | |
196 | - $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function ($model) { |
|
196 | + $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function($model) { |
|
197 | 197 | return static::create($model); |
198 | 198 | })->unsearchable(); |
199 | 199 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | foreach ($this->getModels() as $model) { |
210 | 210 | $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model), true) && config('scout.soft_delete', false); |
211 | 211 | |
212 | - $count += (int) $model::query()->when($softDeletes, function ($query) { |
|
212 | + $count += (int) $model::query()->when($softDeletes, function($query) { |
|
213 | 213 | $query->withTrashed(); |
214 | 214 | })->count(); |
215 | 215 | } |