Skip to content

Commit 395dff3

Browse files
authored
Merge pull request #275 from antoniopaisfernandes/master
Honor the intended collection for the model
2 parents ce1f911 + 8227314 commit 395dff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Engines/TNTSearchEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function map(Builder $builder, $results, $model)
199199
}
200200

201201
// sort models by tnt search result set
202-
return collect($results['ids'])->map(function ($hit) use ($models) {
202+
return $model->newCollection($results['ids'])->map(function ($hit) use ($models) {
203203
if (isset($models[$hit])) {
204204
return $models[$hit];
205205
}

0 commit comments

Comments
 (0)