// +---------------------------------------------------------------------- namespace app\controller; use \app\model\Form; class Front extends Base { public function index() { return $this->fetch(); } public function form(){ if($this->request->isAjax()){ }else{ $id = $this->request->param('id'); $name = $this->request->param('name'); $map = []; $map[] = ['id', '=', $id]; $info = Form::where($map)->find(); $this->data = [ 'info' => $info ]; return $this->fetch(); } } }