改进分页类的toarray方法 增加总页数

This commit is contained in:
thinkphp
2017-05-12 11:50:48 +08:00
parent e13c825aa7
commit ea83a28d7e

View File

@@ -366,6 +366,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
'total' => $total,
'per_page' => $this->listRows(),
'current_page' => $this->currentPage(),
'last_page' => $this->lastPage,
'data' => $this->items->toArray(),
];
}