app/Http/Controllers/Handlers/ResultUpdateQueryHandler.php
/**
	 * Update Labs query by scenario lab id
	 *
	 * @return int
	 */
Update Labs query by scenario lab id
@return int
Update Labs query by scenario lab id @return int
public function updateLabsByScenarioLabId($id, $set)
	{  
		$tp_id = session()->get('open_project');  
		try{  
			$condition = ['scl_id' => $id , 'tp_id' => $tp_id];
        	$labs = \App\Lab::where($condition)->get()->toArray();        	
        	foreach ($labs as $l_value) {
        		$tl_id = $l_value['tl_id'];
    		   	$this->updateExecutionByLabId($tl_id, $set);
        	}
			\App\Lab::where($condition)->update($set);
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function updateLabsByScenarioLabId ( $ id , $ set ) { $ tp_id = session ( ) -> get ( 'open_project' ) ; try { $ condition = [ 'scl_id' => $ id , 'tp_id' => $ tp_id ] ; $ labs = \ App \ Lab :: where ( $ condition ) -> get ( ) -> toArray ( ) ; foreach ( $ labs as $ l_value ) { $ tl_id = $ l_value [ 'tl_id' ] ; $ this -> updateExecutionByLabId ( $ tl_id , $ set ) ; } \ App \ Lab :: where ( $ condition ) -> update ( $ set ) ; } catch ( Exception $ e ) { return 0 ; } return 1 ; }
Update Labs query by scenario lab id
 @return int
Update Labs query by scenario lab id @return int
//Start updating from lowest child //Update associated labs      	