app/Http/Controllers/Handlers/StoreQueryHandler.php
/**
	 * add testcases query by scenario id
	 *
	 * @return int
	 */
add testcases query by scenario id
@return int
add testcases query by scenario id @return int
public function addCaseByScenarioId($id)
	{    
		try{  
        	$cases = \App\TestCase::where('tsc_id' , $id)->get()->toArray();        	
        	foreach ($cases as $c_value) {
        		$tc_id = $c_value['tc_id'];
    		   	$this->addStepsByCaseId($tc_id);
    		   	$this->addLabByCaseId($tc_id);
        	}
        	$case = \App\TestCase::where('tsc_id' , $id)->add();	
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function addCaseByScenarioId ( $ id ) { try { $ cases = \ App \ TestCase :: where ( 'tsc_id' , $ id ) -> get ( ) -> toArray ( ) ; foreach ( $ cases as $ c_value ) { $ tc_id = $ c_value [ 'tc_id' ] ; $ this -> addStepsByCaseId ( $ tc_id ) ; $ this -> addLabByCaseId ( $ tc_id ) ; } $ case = \ App \ TestCase :: where ( 'tsc_id' , $ id ) -> add ( ) ; } catch ( Exception $ e ) { return 0 ; } return 1 ; }
add testcases query by scenario id
 @return int
add testcases query by scenario id @return int
//Start deleting from lowest child //add associated testcases      	