tp5自定义分页参数

2022-04-11
2552

Tp5

thinkphp5

自定义分页参数

#后端代码

$sort_id = input('get.sort_id');

$where2['query']['sort_id'] = $sort_id;
$data=$this->model->paginate(2,'',$where2);

$this->assign('data',$data);
return $this->fetch();



#前端代码

{$data->render()}



文档参考:https://www.kancloud.cn/manual/thinkphp5/154294