背景:为小程序提供api接口,获取评论列表
代码如下,但只能获取到第一页的数据,使用paginate的时候,page是怎么传进去的?
$id=$this->request->post('id')
$page=$this->request->post('page')
$this->commentList($id,$page)
public function commentList($id,$page=1){
$list = Db::name('user')->where('status',1)->paginate(10);
}