Skip to content

Commit

Permalink
fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jun 29, 2021
1 parent 2b1dd75 commit 733eda3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/CollectionEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function paginate(Builder $builder, $perPage, $page)
$models = $this->searchModels($builder);

return [
'results' => $models->forPage($page - 1, $perPage)->all(),
'results' => $models->forPage($page, $perPage)->all(),
'total' => count($models),
];
}
Expand Down

0 comments on commit 733eda3

Please sign in to comment.