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