public function destroy($id)
    {
        $workRequest = $this->workRequest->model()->findOrFail($id);

        if ($workRequest->delete()) {
            $message = 'Successfully deleted work request.';

            return redirect()->route('maintenance.client.work-requests.index')->withSuccess($message);
        } else {
            $message = 'There was an issue deleting this work request. Please try again.';

            return redirect()->route('maintenance.client.work-requests.show', [$id])->withErrors($message);
        }
    }
public function destroy($id)
    {
        $workRequest = $this->workRequest->model()->findOrFail($id);

        if ($workRequest->delete()) {
            $message = 'Successfully deleted work request.';

            return redirect()->route('maintenance.client.work-requests.index')->withSuccess($message);
        } else {
            $message = 'There was an issue deleting this work request. Please try again.';

            return redirect()->route('maintenance.client.work-requests.show', [$id])->withErrors($message);
        }
    }
public function destroy ( $ id ) { $ workRequest = $ this -> workRequest -> model ( ) -> findOrFail ( $ id ) ; if ( $ workRequest -> delete ( ) ) { $ message = 'Successfully deleted work request.' ; return redirect ( ) -> route ( 'maintenance.client.work-requests.index' ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue deleting this work request. Please try again.' ; return redirect ( ) -> route ( 'maintenance.client.work-requests.show' , [ $ id ] ) -> withErrors ( $ message ) ; } }
Deletes a users work request.

@param int|string $id

@return \Illuminate\Http\RedirectResponse
Deletes a users work request .