src/Builders/MigrationBuilder.php
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);
    }
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);
    }
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 ) ; }
Builds a field migration for a table

@param string $name
@param string $type
@param bool $indexed
@param string $tableName
@return string
Builds a field migration for a table