Skip to content

Commit

Permalink
Use hasMorePages() function (laravel#32250)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhsazevedo authored Apr 6, 2020
1 parent ff1a13e commit 573f928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Pagination/LengthAwarePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function hasMorePages()
*/
public function nextPageUrl()
{
if ($this->lastPage() > $this->currentPage()) {
if ($this->hasMorePages()) {
return $this->url($this->currentPage() + 1);
}
}
Expand Down

0 comments on commit 573f928

Please sign in to comment.