Skip to content

Commit

Permalink
Merge pull request #52 from kavinsky/patch-mapids
Browse files Browse the repository at this point in the history
Fix for #51
  • Loading branch information
stokic authored Dec 19, 2016
2 parents dafc582 + 3234dce commit e0fcd7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ public function map($results, $model)
});
}

/**
* Pluck and return the primary keys of the given results.
*
* @param mixed $results
* @return \Illuminate\Support\Collection
*/
public function mapIds($results)
{
return collect($results['ids'])->values();
}

/**
* Get the total count from a raw result returned by the engine.
*
Expand Down

0 comments on commit e0fcd7c

Please sign in to comment.