Skip to content

Commit

Permalink
Honor the intended collection for the model
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniopaisfernandes committed May 25, 2020
1 parent a13b7cf commit 8227314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function map(Builder $builder, $results, $model)
}

// sort models by tnt search result set
return collect($results['ids'])->map(function ($hit) use ($models) {
return $model->newCollection($results['ids'])->map(function ($hit) use ($models) {
if (isset($models[$hit])) {
return $models[$hit];
}
Expand Down

0 comments on commit 8227314

Please sign in to comment.