public function store() { $form = CreateBioForm::fillOut(Input::all(), Auth::user()); try { $bio = $form->complete(); } catch (ValidationException $e) { return Redirect::to('bios/create')->withErrors($e->errors())->withInput(); } Session::flash('message', 'Successfully created new bio.'); return Redirect::to('/bios/' . $bio->id); }
public function store() { // @todo: Why is this here? Why aren't we validating like we do everywhere else? $form = CreateBioForm::fillOut(Input::all(), Auth::user()); try { $bio = $form->complete(); } catch (ValidationException $e) { return Redirect::to('bios/create')->withErrors($e->errors())->withInput(); } Session::flash('message', 'Successfully created new bio.'); return Redirect::to('/bios/' . $bio->id); }