From 16f3043fc2a1d4aab630925884f05416e88858db Mon Sep 17 00:00:00 2001 From: Honarkhah Date: Wed, 20 Jul 2016 13:35:44 +0430 Subject: [PATCH] Update ElasticCollection.php --- src/Fadion/Bouncy/ElasticCollection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Fadion/Bouncy/ElasticCollection.php b/src/Fadion/Bouncy/ElasticCollection.php index eb7d2b5..1dbcb93 100644 --- a/src/Fadion/Bouncy/ElasticCollection.php +++ b/src/Fadion/Bouncy/ElasticCollection.php @@ -1,7 +1,7 @@ items, $perPage); + $paginator = new Paginator($this->items, $this->total(), $perPage); $start = ($paginator->currentPage() - 1) * $perPage; $sliced = array_slice($this->items, $start, $perPage); - return new Paginator($sliced, $perPage); + return new Paginator($sliced, $this->total(), $perPage); } /**