mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进分页类
This commit is contained in:
@@ -341,7 +341,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$total = $this->total();
|
$total = $this->total();
|
||||||
} catch (Exception $e) {
|
} catch (\DomainException $e) {
|
||||||
$total = null;
|
$total = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
|
|||||||
'total' => $total,
|
'total' => $total,
|
||||||
'per_page' => $this->listRows(),
|
'per_page' => $this->listRows(),
|
||||||
'current_page' => $this->currentPage(),
|
'current_page' => $this->currentPage(),
|
||||||
'data' => $this->items->toArray()
|
'data' => $this->items->toArray(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user