app/Http/Controllers/IntegrationHandler.php
/**
   * Handles the scenario part of the row from Excel
   *
   * @return sc_id
   */
Handles the scenario part of the row from Excel
@return sc_id
Handles the scenario part of the row from Excel @return sc_id
public function handleResultScenario($row, $fn_id, $sc_id, $seq)
  {   
       $sc = [];
           if(!isset($row[2]) || $row[2]  == null ||  $row[2] == ""){
           }else{
              $sc['tsc_name']              = $row[2];
              $sc['scenario_brief']        = $row['sceanrio_brief'];
              $sc['description']           = $row['sceanrio_description'];
              $sc['expected_result']       = $row['scenario_expected_result'];
              $sc['seq_no']             = $seq;
              $sc['tp_id']      = session()->get('open_project');
              $sc['tf_id']      = $fn_id;
              $sc_check         =  \App\TestScenario::where($sc)->first();
              if($sc_check!= null && $sc_check->exists == 1)  {
                  $sc_id  = $sc_check->tsc_id;
              }
              else
              {
                  $sc_id = $sc['tsc_id'] = $this->genrateRandomInt();
                  \App\TestScenario::create($sc);
              }
          }
    return $sc_id;
  }
public function handleResultScenario ( $ row , $ fn_id , $ sc_id , $ seq ) { $ sc = [ ] ; if ( ! isset ( $ row [ 2 ] ) || $ row [ 2 ] == null || $ row [ 2 ] == " " ) { } else { $ sc [ 'tsc_name' ] = $ row [ 2 ] ; $ sc [ 'scenario_brief' ] = $ row [ 'sceanrio_brief' ] ; $ sc [ 'description' ] = $ row [ 'sceanrio_description' ] ; $ sc [ 'expected_result' ] = $ row [ 'scenario_expected_result' ] ; $ sc [ 'seq_no' ] = $ seq ; $ sc [ 'tp_id' ] = session ( ) -> get ( 'open_project' ) ; $ sc [ 'tf_id' ] = $ fn_id ; $ sc_check = \ App \ TestScenario :: where ( $ sc ) -> first ( ) ; if ( $ sc_check != null && $ sc_check -> exists == 1 ) { $ sc_id = $ sc_check -> tsc_id ; } else { $ sc_id = $ sc [ 'tsc_id' ] = $ this -> genrateRandomInt ( ) ; \ App \ TestScenario :: create ( $ sc ) ; } } return $ sc_id ; }
Handles the scenario part of the row from Excel
 @return sc_id
Handles the scenario part of the row from Excel @return sc_id
/*if( isset($row['sceanrio_brief'] )){*/ //If nothing to process then do nothing //return $fn_id; //print_r($sc_check); /* }else{
        $sc_id =0;
    }*/