Skip to content

Commit

Permalink
fix eloquent builder
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 7, 2016
1 parent 53f97a0 commit 32d0f16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Database/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ public function chunkById($count, callable $callback, $column = 'id')
$lastId = 0;

do {
$results = $this->forPageAfterId($count, $lastId, $column)->get();
$clone = clone $this;

$results = $clone->forPageAfterId($count, $lastId, $column)->get();

$countResults = $results->count();

Expand Down

0 comments on commit 32d0f16

Please sign in to comment.