app/Http/Controllers/Handlers/DeleteQueryHandler.php
/**
	 * Delete Labs query by testcase id
	 *
	 * @return int
	 */
Delete Labs query by testcase id
@return int
Delete Labs query by testcase id @return int
public function deleteLabByScLabId($id)
	{    
		try{  
			$case_labs = \App\Lab::where('scl_id' , $id)->get()->toArray();        	
        	foreach ($case_labs as $c_value) {
        		$this->deleteExecutionByTestLabId($c_value['tl_id']);
        	}
			$deletedRows = \App\Lab::where(['scl_id' => $id])->delete();
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function deleteLabByScLabId ( $ id ) { try { $ case_labs = \ App \ Lab :: where ( 'scl_id' , $ id ) -> get ( ) -> toArray ( ) ; foreach ( $ case_labs as $ c_value ) { $ this -> deleteExecutionByTestLabId ( $ c_value [ 'tl_id' ] ) ; } $ deletedRows = \ App \ Lab :: where ( [ 'scl_id' => $ id ] ) -> delete ( ) ; } catch ( Exception $ e ) { return 0 ; } return 1 ; }
Delete Labs query by testcase id
 @return int
Delete Labs query by testcase id @return int