original_string: public function addRelationshipsInParents()
      {
          $options = config('generators.settings');
          if (!$options['model']) {
              $this->info('Model files not found.');
  
              return;
          }
  
          $modelSettings = $options['model'];
  
          // model names
          $modelOne = $this->getModelName($this->argument('tableOne'));
          $modelTwo = $this->getModelName($this->argument('tableTwo'));
  
          // model path
          $modelOnePath = $modelSettings['path'] . $modelOne . '.php';
          $modelTwoPath = $modelSettings['path'] . $modelTwo . '.php';
  
          $this->addRelationshipInModel($modelOnePath, $modelTwo, $this->argument('tableTwo'));
          $this->addRelationshipInModel($modelTwoPath, $modelOne, $this->argument('tableOne'));
      }
code: public function addRelationshipsInParents()
      {
          $options = config('generators.settings');
          if (!$options['model']) {
              $this->info('Model files not found.');
  
              return;
          }
  
          $modelSettings = $options['model'];
  
          // model names
          $modelOne = $this->getModelName($this->argument('tableOne'));
          $modelTwo = $this->getModelName($this->argument('tableTwo'));
  
          // model path
          $modelOnePath = $modelSettings['path'] . $modelOne . '.php';
          $modelTwoPath = $modelSettings['path'] . $modelTwo . '.php';
  
          $this->addRelationshipInModel($modelOnePath, $modelTwo, $this->argument('tableTwo'));
          $this->addRelationshipInModel($modelTwoPath, $modelOne, $this->argument('tableOne'));
      }
code_tokens: public function addRelationshipsInParents ( ) { $ options = config ( 'generators.settings' ) ; if ( ! $ options [ 'model' ] ) { $ this -> info ( 'Model files not found.' ) ; return ; } $ modelSettings = $ options [ 'model' ] ; // model names $ modelOne = $ this -> getModelName ( $ this -> argument ( 'tableOne' ) ) ; $ modelTwo = $ this -> getModelName ( $ this -> argument ( 'tableTwo' ) ) ; // model path $ modelOnePath = $ modelSettings [ 'path' ] . $ modelOne . '.php' ; $ modelTwoPath = $ modelSettings [ 'path' ] . $ modelTwo . '.php' ; $ this -> addRelationshipInModel ( $ modelOnePath , $ modelTwo , $ this -> argument ( 'tableTwo' ) ) ; $ this -> addRelationshipInModel ( $ modelTwoPath , $ modelOne , $ this -> argument ( 'tableOne' ) ) ; }
docstring: Append Many to Many Relationships in Parent Models
docstring_tokens: Append Many to Many Relationships in Parent Models