Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }