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 deleteFunctionalityByProjectId($id)
	{    
		try{  
        	$functionality = \App\TestFunctionality::where('tp_id' , $id)->get()->toArray();        	
        	foreach ($functionality as $f_value) {
        		$tf_id = $f_value['tf_id'];
    		   	$this->deleteScenarioByFunctionalityId($tf_id);
        	}
        	$tf = \App\TestFunctionality::where('tp_id' , $id)->delete();		
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function deleteFunctionalityByProjectId ( $ id ) { try { $ functionality = \ App \ TestFunctionality :: where ( 'tp_id' , $ id ) -> get ( ) -> toArray ( ) ; foreach ( $ functionality as $ f_value ) { $ tf_id = $ f_value [ 'tf_id' ] ; $ this -> deleteScenarioByFunctionalityId ( $ tf_id ) ; } $ tf = \ App \ TestFunctionality :: where ( 'tp_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       	