app/Http/Controllers/Handlers/LabHandler.php
/**
	 * Create scenario lab by scenario obj
	 *
	 * @return int
	 */
Create scenario lab by scenario obj
@return int
Create scenario lab by scenario obj @return int
public function createScLabByScenarioDetails($sc)
	{ 
		$final_data = [];
		$tp_id 				= session()->get('open_project');  
		$scl_id 			= $sc_lab['scl_id'] 	= $this->genrateRandomInt();
		$sc_lab['tp_id'] 	= session()->get('open_project');
		$sc_lab['tsc_id'] 	= $sc->tsc_id;
		$sc_lab['tf_id'] 	= $sc->tf_id;
		$sc_lab['result'] 	= '';
		$sc_lab['execution_type'] 	= '';
		$sc_lab['executed_by'] 		= '';
		\App\ScenarioLab::create($sc_lab);
		return $scl_id;
	}
public function createScLabByScenarioDetails ( $ sc ) { $ final_data = [ ] ; $ tp_id = session ( ) -> get ( 'open_project' ) ; $ scl_id = $ sc_lab [ 'scl_id' ] = $ this -> genrateRandomInt ( ) ; $ sc_lab [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ sc_lab [ 'tsc_id' ] = $ sc -> tsc_id ; $ sc_lab [ 'tf_id' ] = $ sc -> tf_id ; $ sc_lab [ 'result' ] = '' ; $ sc_lab [ 'execution_type' ] = '' ; $ sc_lab [ 'executed_by' ] = '' ; \ App \ ScenarioLab :: create ( $ sc_lab ) ; return $ scl_id ; }
Create scenario lab by scenario obj
 @return int
Create scenario lab by scenario obj @return int
//Start by creating lab for highest level of hierarchy  /*
		$excel_data['Scenario ID']   = $sc_lab['scl_id'];
		$excel_data['Scenario Name'] = $sc->tsc_name;
		$excel_data['Scenario Description'] = $sc->description;
		$excel_data['Scenario Result']   = '';

    	$cases = \App\TestCase::where('tsc_id' , $sc->tsc_id)->orderBy('seq_no', 'asc')->get()->toArray();

    	$case_count = 0;
    	foreach ($cases as $c_value) {
    		//echo $c_value['tc_name'];
    		$tc_id = $c_value['tc_id'];
    		if($case_count != 0){
		   		$excel_data['Scenario ID']   = '';
				$excel_data['Scenario Name'] = '';
				$excel_data['Scenario Description'] = '';				
				$excel_data['Scenario Result']   = '';
		   	}
		   	$case_count++;
		   	$excel_data = $this->createLabByCase($c_value, $sc->tf_id, $sc_lab['scl_id'], $excel_data);
		   	$tl_id = $excel_data['Test Case ID'];
		   	
		   	$steps 						= \App\TestStep::where(['tc_id'=> $tc_id])->orderBy('seq_no', 'asc')->get();

			$step_count = 0;
			foreach ($steps as $ts_value) {
	        		if($step_count != 0){
	        			$excel_data['Scenario ID']   = '';
						$excel_data['Scenario Name'] = '';
						$excel_data['Scenario Result']   = '';
						$excel_data['Scenario Description'] = '';				
	        			$excel_data['Test Case ID'] = '';
	    		   		$excel_data['Test Case Name'] = '';
	    		   		$excel_data['Test Case Description'] = '';
	    		   		$excel_data['Case Result'] = '';
	    		   	}
	    		   	$excel_data = $this->createExecutionByStep($ts_value, $tl_id, $excel_data);
	    		    $final_data[] = $excel_data; 
	    		   	$step_count++;
	        }
		}*/