app/Http/Controllers/Handlers/StoreQueryHandler.php
/**
	 * add Steps query by testcase id
	 *
	 * @return int
	 */
add Steps query by testcase id
@return int
add Steps query by testcase id @return int
public function addStep($ts_id, $request, $e_id, $tc)
	{  
		try{  
				$content['ts_id']                 	= $ts_id;
				$content['ts_name']                 = "";
				$content['created_by'] 				= session()->get('email');
		        $content['description']             = $request->description;
		        $content['expected_result']         = $request->expected_result;
				$content['status']             		= "not_executed";
		        $content['tp_id']                 	= session()->get('open_project');
		        $content['tc_id']                 	= $tc;
		        $content['seq_no'] 	        		= $request->seq_no;	
		        if($content['seq_no']  == null ||  $content['seq_no']  == "" )
		        {
		        	$count 								= \App\TestStep::where('tc_id', $tc)->count();
		       		$content['seq_no'] 	        		= $count+1;	
		       	}	
		        $create 							= \App\TestStep::create($content);
				if($this->addExecution($e_id, $request, $content) == 0)
					return 0;
		}catch(Exception $e)
		{
			return 0;
		}
		return 1;
	}
public function addStep ( $ ts_id , $ request , $ e_id , $ tc ) { try { $ content [ 'ts_id' ] = $ ts_id ; $ content [ 'ts_name' ] = " " ; $ content [ 'created_by' ] = session ( ) -> get ( 'email' ) ; $ content [ 'description' ] = $ request -> description ; $ content [ 'expected_result' ] = $ request -> expected_result ; $ content [ 'status' ] = " not_executed " ; $ content [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ content [ 'tc_id' ] = $ tc ; $ content [ 'seq_no' ] = $ request -> seq_no ; if ( $ content [ 'seq_no' ] == null || $ content [ 'seq_no' ] == " " ) { $ count = \ App \ TestStep :: where ( 'tc_id' , $ tc ) -> count ( ) ; $ content [ 'seq_no' ] = $ count + 1 ; } $ create = \ App \ TestStep :: create ( $ content ) ; if ( $ this -> addExecution ( $ e_id , $ request , $ content ) == 0 ) return 0 ; } catch ( Exception $ e ) { return 0 ; } return 1 ; }
add Steps query by testcase id
 @return int
add Steps query by testcase id @return int
//Add entry in execution table for this step