@@ -180,9 +180,9 @@ discard block |
||
| 180 | 180 | $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', |
| 181 | 181 | false); |
| 182 | 182 | |
| 183 | - $instance->newQuery()->when($softDeletes, function ($query) { |
|
| 183 | + $instance->newQuery()->when($softDeletes, function($query) { |
|
| 184 | 184 | $query->withTrashed(); |
| 185 | - })->orderBy($instance->getKeyName())->get()->map(function ($model) { |
|
| 185 | + })->orderBy($instance->getKeyName())->get()->map(function($model) { |
|
| 186 | 186 | return static::create($model); |
| 187 | 187 | })->searchable(); |
| 188 | 188 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | foreach ((new static)->getModels() as $model) { |
| 199 | 199 | $instance = new $model; |
| 200 | 200 | |
| 201 | - $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function ($model) { |
|
| 201 | + $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function($model) { |
|
| 202 | 202 | return static::create($model); |
| 203 | 203 | })->unsearchable(); |
| 204 | 204 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model), |
| 216 | 216 | true) && config('scout.soft_delete', false); |
| 217 | 217 | |
| 218 | - $count += $model::query()->when($softDeletes, function ($query) { |
|
| 218 | + $count += $model::query()->when($softDeletes, function($query) { |
|
| 219 | 219 | $query->withTrashed(); |
| 220 | 220 | })->count(); |
| 221 | 221 | } |