original_string: public function buildFieldMigrationForTable($name, $type, $indexed, $tableName)
      {
          $path = $this->getMigrationPath($tableName, $name);
          $migration = $this->getTableFieldMigrationName($name, $tableName);
  
          $contents = view('_hierarchy::migrations.field', [
              'field'     => $name,
              'table'     => source_table_name($tableName),
              'migration' => $migration,
              'type'      => $this->getColumnType($type),
              'indexed'   => $indexed
          ])->render();
  
          $this->write($path, $contents);
  
          return $this->getMigrationClassPath($migration);
      }
code: public function buildFieldMigrationForTable($name, $type, $indexed, $tableName)
      {
          $path = $this->getMigrationPath($tableName, $name);
          $migration = $this->getTableFieldMigrationName($name, $tableName);
  
          $contents = view('_hierarchy::migrations.field', [
              'field'     => $name,
              'table'     => source_table_name($tableName),
              'migration' => $migration,
              'type'      => $this->getColumnType($type),
              'indexed'   => $indexed
          ])->render();
  
          $this->write($path, $contents);
  
          return $this->getMigrationClassPath($migration);
      }
code_tokens: public function buildFieldMigrationForTable ( $ name , $ type , $ indexed , $ tableName ) { $ path = $ this -> getMigrationPath ( $ tableName , $ name ) ; $ migration = $ this -> getTableFieldMigrationName ( $ name , $ tableName ) ; $ contents = view ( '_hierarchy::migrations.field' , [ 'field' => $ name , 'table' => source_table_name ( $ tableName ) , 'migration' => $ migration , 'type' => $ this -> getColumnType ( $ type ) , 'indexed' => $ indexed ] ) -> render ( ) ; $ this -> write ( $ path , $ contents ) ; return $ this -> getMigrationClassPath ( $ migration ) ; }
docstring: Builds a field migration for a table
  
  @param string $name
  @param string $type
  @param bool $indexed
  @param string $tableName
  @return string
docstring_tokens: Builds a field migration for a table