From 5e59a72b5b8629ea78b961e96bc57e42290007e2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 8 Feb 2012 11:16:55 -0600 Subject: [PATCH] fix bug in paginator. --- laravel/database/query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/database/query.php b/laravel/database/query.php index 0f20d10b..fc7f91ce 100644 --- a/laravel/database/query.php +++ b/laravel/database/query.php @@ -679,7 +679,9 @@ class Query { // retrieved the count from the table. list($orderings, $this->orderings) = array($this->orderings, null); - $page = Paginator::page($total = $this->count($columns), $per_page); + $total = $this->count(reset($columns)); + + $page = Paginator::page($total, $per_page); $this->orderings = $orderings;