app/Http/Controllers/Handlers/ResultUpdateQueryHandler.php
/**
	 * Delete scenarios query by functionality id
	 *
	 * @return int
	 */
Delete scenarios query by functionality id
@return int
Delete scenarios query by functionality id @return int
public function deleteScenarioByFunctionalityId($id)
	{    
		try{  
        	$scs = \App\TestScenario::where('tf_id' , $id)->get()->toArray();        	
        	foreach ($scs as $sc_value) {
        		$tsc_id = $sc_value['tsc_id'];
    		   	$this->deleteCaseByScenarioId($tsc_id);
    		   	$this->deleteScLabByScenarioId($tsc_id);
        	}
        	$scs = \App\TestScenario::where('tf_id' , $id)->delete();
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function deleteScenarioByFunctionalityId ( $ id ) { try { $ scs = \ App \ TestScenario :: where ( 'tf_id' , $ id ) -> get ( ) -> toArray ( ) ; foreach ( $ scs as $ sc_value ) { $ tsc_id = $ sc_value [ 'tsc_id' ] ; $ this -> deleteCaseByScenarioId ( $ tsc_id ) ; $ this -> deleteScLabByScenarioId ( $ tsc_id ) ; } $ scs = \ App \ TestScenario :: where ( 'tf_id' , $ id ) -> delete ( ) ; } catch ( Exception $ e ) { return 0 ; } return 1 ; }
Delete scenarios query by functionality id
 @return int
Delete scenarios query by functionality id @return int
//Start deleting from lowest child //Delete associated teststeps        	     	