mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修复
This commit is contained in:
@@ -51,7 +51,7 @@ class Collection extends \think\Collection
|
|||||||
return $this->paginator;
|
return $this->paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toArray()
|
public function toArray($allow = [])
|
||||||
{
|
{
|
||||||
if ($this->paginator) {
|
if ($this->paginator) {
|
||||||
try {
|
try {
|
||||||
@@ -64,10 +64,10 @@ class Collection extends \think\Collection
|
|||||||
'total' => $total,
|
'total' => $total,
|
||||||
'per_page' => $this->listRows(),
|
'per_page' => $this->listRows(),
|
||||||
'current_page' => $this->currentPage(),
|
'current_page' => $this->currentPage(),
|
||||||
'data' => parent::toArray()
|
'data' => parent::toArray($allow)
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
return parent::toArray();
|
return parent::toArray($allow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user