Beispiel #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     if ($this->validateSignUpInfo()) {
         Session::flash('signup_status', false);
         return Redirect::to('signup');
     } else {
         if (!UsersHelper::isExistedUser()) {
             $new = UsersHelper::saveNewUser();
             if ($new) {
                 Session::flash('signup_status', true);
                 Session::set("current_user", $new->id);
                 return Redirect::to('home');
             } else {
                 return Redirect::to('signup');
             }
         } else {
             return Redirect::to('signup');
         }
     }
 }