public static function signup() { $input = Input::all(); $check = User::checkEmailAlreadyExist($input['email']); if ($check) { return Redirect::to('/employers/signup')->withErrors(array("msg" => "Sorry!! This Email already Exist, please use different email.")); } else { $flag = Employers::addEmployer(); if ($flag) { return Redirect::to('/employers/login')->withErrors(array("msg" => "Employer added successfully! Please Login To continue.")); } else { return Redirect::to('/employers/signup')->withErrors(array("msg" => "Employer Not added Succesfully, please try again.")); } } }