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