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

Commit

Permalink
Fix call database query on model #265. (#338)
Browse files Browse the repository at this point in the history
* Fix call database query on model.

* Style CI
  • Loading branch information
cornelp authored Jun 1, 2020
1 parent 3b8e570 commit b030768
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ElasticEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ public function map(Builder $builder, $results, $model)

$models = $query
->whereIn($scoutKeyName, $ids)
->when($builder->queryCallback, function ($query, $callback) {
return $callback($query);
})
->get($columns)
->keyBy($scoutKeyName);

Expand Down

0 comments on commit b030768

Please sign in to comment.