From 0d290c342087542e543ed8e47e917b6a373f7f25 Mon Sep 17 00:00:00 2001 From: mistenkt Date: Fri, 22 Sep 2017 10:09:32 +0200 Subject: [PATCH] changed baserepo ->page default value --- src/BaseRepository.php | 2 +- src/BaseRepositoryInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BaseRepository.php b/src/BaseRepository.php index 123d61e..ac1e611 100644 --- a/src/BaseRepository.php +++ b/src/BaseRepository.php @@ -198,7 +198,7 @@ public function orderBy($column, $direction = 'ASC') * * @return $this */ - public function page($page, $perPage = 15) + public function page($page = 1, $perPage = 15) { $offset = ($page * $perPage) - $perPage; diff --git a/src/BaseRepositoryInterface.php b/src/BaseRepositoryInterface.php index a201238..037d813 100644 --- a/src/BaseRepositoryInterface.php +++ b/src/BaseRepositoryInterface.php @@ -110,7 +110,7 @@ public function orderBy($column, $direction = 'ASC'); * * @return $this */ - public function page($page, $perPage = 15); + public function page($page = 1, $perPage = 15); /** * Count total rows