Skip to content

Commit

Permalink
fix chunkById for types other than ObjectId and laravel >= 5.6.25 (mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnphpexpert committed Apr 7, 2019
1 parent 3f0609c commit dbe14c8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Jenssegers/Mongodb/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,6 @@ public function chunkById($count, callable $callback, $column = '_id', $alias =
*/
public function forPageAfterId($perPage = 15, $lastId = 0, $column = '_id')
{
// When using ObjectIDs to paginate, we need to use a hex string as the
// "minimum" ID rather than the integer zero so the '$lt' query works.
if ($column === '_id' && $lastId === 0) {
$lastId = '000000000000000000000000';
}

return parent::forPageAfterId($perPage, $lastId, $column);
}

Expand Down

0 comments on commit dbe14c8

Please sign in to comment.