/**
* 编辑
*/
public function edit($ids = null)
{
$row = $this->model->get($ids);
//原数据
$rowdata = $this->model->get($ids)->toArray();
if ($this->request->isPost()) {
//表单提交的数据
$data = $this->request->post();
$model = new WithdrawModel;
$model->allowField(true)->save($data, ['id' => $rowdata['id']]);
$this->success();
}else{
return parent::edit($ids);
}
}
发表评论 取消回复