Modules\Doptor\Slideshow\Controllers\Backend\SlideshowController::store PHP Method

store() public method

Store a newly created resource in storage.
public store ( ) : Response
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}.modules.doptor.slideshow.index")->with('success_message', trans('success_messages.slide_create'));
        } catch (ValidationException $e) {
            return Redirect::back()->withInput()->withErrors($e->getErrors());
        }
    }