public function register() { $user = $this->candidateRepo->newCandidate(); $manager = new RegisterManager($user, Input::all()); $manager->save(); return Redirect::route('home'); }
public function register() { $user = $this->candidateRepo->newCandidate(); $manager = new RegisterManager($user, Input::all()); if ($manager->save()) { return Redirect::route('home'); } return Redirect::back()->withInput()->withErrors($manager->getErrors()); }