public function cancel($id, $table)
    {
        if ($this->service->cancel($id, $table)) {
            return back()->with('message', 'The job was successfully cancelled');
        }

        return back()->withErrors('Failed to cancel the job');
    }
public function cancel($id, $table)
    {
        if ($this->service->cancel($id, $table)) {
            return back()->with('message', 'The job was successfully cancelled');
        }

        return back()->withErrors('Failed to cancel the job');
    }
public function cancel ( $ id , $ table ) { if ( $ this -> service -> cancel ( $ id , $ table ) ) { return back ( ) -> with ( 'message' , 'The job was successfully cancelled' ) ; } return back ( ) -> withErrors ( 'Failed to cancel the job' ) ; }
Cancel the job

@param  int $id
@param  string $table

@return Response
Cancel the job