mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-10 17:42:50 +00:00
修改分页查询
This commit is contained in:
parent
203a082b22
commit
4f8457d30a
@ -125,7 +125,12 @@ trait ModelTrait
|
||||
$params = [];
|
||||
}
|
||||
|
||||
$paginate = $model === null ? self::paginate($limit, false, ['query' => $params]) : $model->paginate($limit, false, ['query' => $params]);
|
||||
|
||||
$listRows = [
|
||||
'list_rows' => $limit,
|
||||
'query' => $params
|
||||
];
|
||||
$paginate = $model === null ? self::paginate($listRows, false) : $model->paginate($listRows, false);
|
||||
$list = is_callable($eachFn) ? $paginate->each($eachFn) : $paginate;
|
||||
$page = $list->render();
|
||||
$total = $list->total();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user