public function update(EventRequest $request, $resourceId, $eventId)
    {
        $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);

        $event = $this->event->update($request, $eventId);

        if ($event) {
            $message = 'Successfully updated event.';

            return redirect()->route($this->routes['show'], [$eventable->id, $event->id])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this event. Please try again.';

            return redirect()->route($this->routes['edit'], [$eventable->id])->withErrors($message);
        }
    }
public function update(EventRequest $request, $resourceId, $eventId)
    {
        $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);

        $event = $this->event->update($request, $eventId);

        if ($event) {
            $message = 'Successfully updated event.';

            return redirect()->route($this->routes['show'], [$eventable->id, $event->id])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this event. Please try again.';

            return redirect()->route($this->routes['edit'], [$eventable->id])->withErrors($message);
        }
    }
public function update ( EventRequest $ request , $ resourceId , $ eventId ) { $ eventable = $ this -> getEventableRepository ( ) -> model ( ) -> findOrFail ( $ resourceId ) ; $ event = $ this -> event -> update ( $ request , $ eventId ) ; if ( $ event ) { $ message = 'Successfully updated event.' ; return redirect ( ) -> route ( $ this -> routes [ 'show' ] , [ $ eventable -> id , $ event -> id ] ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue updating this event. Please try again.' ; return redirect ( ) -> route ( $ this -> routes [ 'edit' ] , [ $ eventable -> id ] ) -> withErrors ( $ message ) ; } }
Updates the specified event attached to the specified eventable.

@param EventRequest $request
@param int|string   $resourceId
@param int|string   $eventId

@return \Illuminate\Http\RedirectResponse
Updates the specified event attached to the specified eventable .