app/Http/Controllers/IntegrationHandler.php
/**
	 * Handles the testcase part of the row from excel
	 *
	 * @return tc_id
	 */
Handles the testcase part of the row from excel
@return tc_id
Handles the testcase part of the row from excel @return tc_id
public function handleTestcase($row, $sc_id, $tc_id, $seq)
	{
       $tc = [];
         if( !isset($row[6])  || $row[6]  == null ||  $row[6] == ""|| count($row[6]) == 0){
           }else{
              $tc['tc_name'] 			      = $row[6];
              $tc['description'] 		    = $row[7];
              $tc['expected_result'] 	  = $row[8];
              if(isset($row[11]))
                $tc['tc_priority']      = $row[11];
              else
                $tc['tc_priority']      = "";
              $tc['tp_id'] 			        = session()->get('open_project');
              $tc['tsc_id'] 			      = $sc_id;
              $tc['seq_no']             = $seq;
              $tc_check 				        =  \App\TestCase::where($tc)->first();
              if($tc_check!= null && $tc_check->exists == 1)	{
                  $tc_id  = $tc_check->tc_id;
              }
              else
              {
                  $tc_id = $tc['tc_id'] = $sc_id."_". $this->genrateRandomInt();
                  $tc['status'] = 'not_executed';        		
                  \App\TestCase::create($tc);
              }
          } 
        return $tc_id;
    }
public function handleTestcase ( $ row , $ sc_id , $ tc_id , $ seq ) { $ tc = [ ] ; if ( ! isset ( $ row [ 6 ] ) || $ row [ 6 ] == null || $ row [ 6 ] == " " || count ( $ row [ 6 ] ) == 0 ) { } else { $ tc [ 'tc_name' ] = $ row [ 6 ] ; $ tc [ 'description' ] = $ row [ 7 ] ; $ tc [ 'expected_result' ] = $ row [ 8 ] ; if ( isset ( $ row [ 11 ] ) ) $ tc [ 'tc_priority' ] = $ row [ 11 ] ; else $ tc [ 'tc_priority' ] = " " ; $ tc [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ tc [ 'tsc_id' ] = $ sc_id ; $ tc [ 'seq_no' ] = $ seq ; $ tc_check = \ App \ TestCase :: where ( $ tc ) -> first ( ) ; if ( $ tc_check != null && $ tc_check -> exists == 1 ) { $ tc_id = $ tc_check -> tc_id ; } else { $ tc_id = $ tc [ 'tc_id' ] = $ sc_id . " _ " . $ this -> genrateRandomInt ( ) ; $ tc [ 'status' ] = 'not_executed' ; \ App \ TestCase :: create ( $ tc ) ; } } return $ tc_id ; }
Handles the testcase part of the row from excel
 @return tc_id
Handles the testcase part of the row from excel @return tc_id
/* if( isset($row[6])){
        */ //If nothing to process then do nothing //return $fn_id; /*}else{
            $tc_id =0;
        }*/