Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit b030768

Browse files
authored
Fix call database query on model #265. (#338)
* Fix call database query on model. * Style CI
1 parent 3b8e570 commit b030768

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ElasticEngine.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ public function map(Builder $builder, $results, $model)
312312

313313
$models = $query
314314
->whereIn($scoutKeyName, $ids)
315+
->when($builder->queryCallback, function ($query, $callback) {
316+
return $callback($query);
317+
})
315318
->get($columns)
316319
->keyBy($scoutKeyName);
317320

0 commit comments

Comments
 (0)