Beispiel #1
0
 /**
  * Store a newly created resource in storage.
  * @return Response
  */
 public function store()
 {
     $input = Input::all();
     $input['created_by'] = Sentry::getUser()->id;
     try {
         $slide = new Slideshow($input);
         $slide->save();
         return Redirect::route("{$this->link_type}.slideshow.index")->with('success_message', 'The slide was added.');
     } catch (ValidationException $e) {
         return Redirect::back()->withInput()->withErrors($e->getErrors());
     }
 }