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

        if (empty($event)) {
            Cms::notification('Event not found', 'warning');

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

        $event = $this->repository->update($event, $request->all());
        Cms::notification('Event updated successfully.', 'success');

        if (!$event) {
            Cms::notification('Event could not be saved.', 'warning');
        }

        return redirect(URL::previous());
    }
public function update($id, EventRequest $request)
    {
        $event = $this->repository->find($id);

        if (empty($event)) {
            Cms::notification('Event not found', 'warning');

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

        $event = $this->repository->update($event, $request->all());
        Cms::notification('Event updated successfully.', 'success');

        if (!$event) {
            Cms::notification('Event could not be saved.', 'warning');
        }

        return redirect(URL::previous());
    }
public function update ( $ id , EventRequest $ request ) { $ event = $ this -> repository -> find ( $ id ) ; if ( empty ( $ event ) ) { Cms :: notification ( 'Event not found' , 'warning' ) ; return redirect ( route ( $ this -> routeBase . '.events.index' ) ) ; } $ event = $ this -> repository -> update ( $ event , $ request -> all ( ) ) ; Cms :: notification ( 'Event updated successfully.' , 'success' ) ; if ( ! $ event ) { Cms :: notification ( 'Event could not be saved.' , 'warning' ) ; } return redirect ( URL :: previous ( ) ) ; }
Update the specified Event in storage.

@param int          $id
@param EventRequest $request

@return Response
Update the specified Event in storage .