public function destroy($id)
    {
        if ($this->event->delete($id)) {
            $message = 'Successfully deleted event';

            return redirect()->route('maintenance.events.index')->withSuccess($message);
        } else {
            $message = 'There was an error trying to delete this event. Please try again.';

            return redirect()->route('maintenance.events.show', [$id])->withErrors($message);
        }
    }
public function destroy($id)
    {
        if ($this->event->delete($id)) {
            $message = 'Successfully deleted event';

            return redirect()->route('maintenance.events.index')->withSuccess($message);
        } else {
            $message = 'There was an error trying to delete this event. Please try again.';

            return redirect()->route('maintenance.events.show', [$id])->withErrors($message);
        }
    }
public function destroy ( $ id ) { if ( $ this -> event -> delete ( $ id ) ) { $ message = 'Successfully deleted event' ; return redirect ( ) -> route ( 'maintenance.events.index' ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an error trying to delete this event. Please try again.' ; return redirect ( ) -> route ( 'maintenance.events.show' , [ $ id ] ) -> withErrors ( $ message ) ; } }
Deletes the specified event.

@param int|string $id

@return \Illuminate\Http\RedirectResponse
Deletes the specified event .