public function update($id, WidgetRequest $request)
    {
        $widgets = $this->repository->find($id);

        if (empty($widgets)) {
            Cms::notification('Widgets not found', 'warning');

            return redirect(route($this->routeBase.'.widgets.index'));
        }

        $widgets = $this->repository->update($widgets, $request->all());

        Cms::notification('Widgets updated successfully.', 'success');

        return redirect(url()->previous());
    }
public function update($id, WidgetRequest $request)
    {
        $widgets = $this->repository->find($id);

        if (empty($widgets)) {
            Cms::notification('Widgets not found', 'warning');

            return redirect(route($this->routeBase.'.widgets.index'));
        }

        $widgets = $this->repository->update($widgets, $request->all());

        Cms::notification('Widgets updated successfully.', 'success');

        return redirect(url()->previous());
    }
public function update ( $ id , WidgetRequest $ request ) { $ widgets = $ this -> repository -> find ( $ id ) ; if ( empty ( $ widgets ) ) { Cms :: notification ( 'Widgets not found' , 'warning' ) ; return redirect ( route ( $ this -> routeBase . '.widgets.index' ) ) ; } $ widgets = $ this -> repository -> update ( $ widgets , $ request -> all ( ) ) ; Cms :: notification ( 'Widgets updated successfully.' , 'success' ) ; return redirect ( url ( ) -> previous ( ) ) ; }
Update the specified Widgets in storage.

@param int            $id
@param WidgetRequest $request

@return Response
Update the specified Widgets in storage .