|
@@ -94,7 +94,7 @@ discard block |
|
|
block discarded – undo |
|
94
|
94
|
|
|
95
|
95
|
$models = resolve(ModelsResolver::class)->from($builder, $searchable, $ids); |
|
96
|
96
|
|
|
97
|
|
- return $models->map(function ($model) use ($hits) { |
|
|
97
|
+ return $models->map(function($model) use ($hits) { |
|
98
|
98
|
if ($hit = $hits->get(ObjectIdEncrypter::encrypt($model))) { |
|
99
|
99
|
foreach (Arr::only($hit, ['_highlightResult', '_rankingInfo']) as $key => $value) { |
|
100
|
100
|
$model->withScoutMetadata($key, $value); |
|
@@ -122,8 +122,8 @@ discard block |
|
|
block discarded – undo |
|
122
|
122
|
{ |
|
123
|
123
|
$operators = ['<', '<=', '=', '!=', '>=', '>', ':']; |
|
124
|
124
|
|
|
125
|
|
- return collect($builder->wheres)->map(function ($value, $key) use ($operators) { |
|
126
|
|
- if (! is_array($value)) { |
|
|
125
|
+ return collect($builder->wheres)->map(function($value, $key) use ($operators) { |
|
|
126
|
+ if ( ! is_array($value)) { |
|
127
|
127
|
if (Str::endsWith($key, $operators) || Str::startsWith($value, $operators)) { |
|
128
|
128
|
return $key.' '.$value; |
|
129
|
129
|
} |
Please login to merge, or discard this patch.