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

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

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

            return redirect()->route('maintenance.events.create')->withErrors($message);
        }
    }
public function update(Request $request, $id)
    {
        $event = $this->event->update($request, $id);

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

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

            return redirect()->route('maintenance.events.create')->withErrors($message);
        }
    }
public function update ( Request $ request , $ id ) { $ event = $ this -> event -> update ( $ request , $ id ) ; if ( $ event ) { $ message = 'Successfully updated event.' ; return redirect ( ) -> route ( 'maintenance.events.show' , [ $ event -> id ] ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue updating this event. Please try again.' ; return redirect ( ) -> route ( 'maintenance.events.create' ) -> withErrors ( $ message ) ; } }
Updates an event.

@param Request    $request
@param int|string $id

@return \Illuminate\Support\Facades\Response
Updates an event .