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

update() public method

Update the specified resource in storage.
public update ( integer $id ) : Response
$id integer
return Response
    public function update($id)
    {
        $input = Input::all();
        $input['updated_by'] = Sentry::getUser()->id;
        try {
            $slide = Slideshow::findOrFail($id);
            $slide->update($input);
            return Redirect::route("{$this->link_type}.modules.doptor.slideshow.index")->with('success_message', trans('success_messages.slide_update'));
        } catch (ValidationException $e) {
            return Redirect::back()->withInput()->withErrors($e->getErrors());
        }
    }