在我的控制器中我有这个
public function station_users($id=null){
$users = $this->User->find('all',array('conditions'=>array('test_id'=>$this->params['named']['test_id'])));
$this->set('users', $users);
$this->render("station_users",'ajax');
}
我正在为某个测试 ID 获取所有用户,但现在我的排序不起作用。如何添加分页。我试过
$this->User->recursive = 0;
$this->set('users', $this->paginate());
那没用,谢谢