public function signupAction() { $this->view->disable(); if ($this->request->isAjax()) { $data = $this->request->getPost(); $response = new Response(); $response->assign(array('uuid' => $this->gen_uuid())); if ($response->save()) { // $this->persistent->uuid = $response->uuid; echo json_encode($response->toArray()); // echo json_encode(true); } else { echo json_encode(false); } } }