From 3a18b520d6c91be8cb783d7d9d14f8e024b9022a Mon Sep 17 00:00:00 2001 From: lilwil Date: Sun, 10 Jul 2016 08:32:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/paginator/Collection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/paginator/Collection.php b/library/think/paginator/Collection.php index 64fbb93b..ddea7d5a 100644 --- a/library/think/paginator/Collection.php +++ b/library/think/paginator/Collection.php @@ -51,7 +51,7 @@ class Collection extends \think\Collection return $this->paginator; } - public function toArray() + public function toArray($allow = []) { if ($this->paginator) { try { @@ -64,10 +64,10 @@ class Collection extends \think\Collection 'total' => $total, 'per_page' => $this->listRows(), 'current_page' => $this->currentPage(), - 'data' => parent::toArray() + 'data' => parent::toArray($allow) ]; } else { - return parent::toArray(); + return parent::toArray($allow); } }