From 573f9288225593bd47bd0268947cb8553467640b Mon Sep 17 00:00:00 2001 From: Lucas Henrique Date: Mon, 6 Apr 2020 10:31:42 -0300 Subject: [PATCH] Use hasMorePages() function (#32250) --- src/Illuminate/Pagination/LengthAwarePaginator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Pagination/LengthAwarePaginator.php b/src/Illuminate/Pagination/LengthAwarePaginator.php index edf0c20ec7e3..ba368cfe5149 100644 --- a/src/Illuminate/Pagination/LengthAwarePaginator.php +++ b/src/Illuminate/Pagination/LengthAwarePaginator.php @@ -139,7 +139,7 @@ public function hasMorePages() */ public function nextPageUrl() { - if ($this->lastPage() > $this->currentPage()) { + if ($this->hasMorePages()) { return $this->url($this->currentPage() + 1); } }