if (Request::isAjax()) {
$data = Request::except('password_confirm', 'post');
if (is_object(UserModel::create($data ))) {
Return ['STATUS' = & GT; 1, 'Message' = & GT; message' => 'Registration failed'];
}
}else{
return $this->error("Request type error", 'register');
}
$ret = array( 'status' => 1, 'message' => 'Congratulations on successful registration' ); echo json_encode($ret);die;
Change to json format, the array you returned is not recognized by js