source/Scaffolder/Declarations/MigrationDeclaration.php
public function declareCreation(string $table, array $columns)
    {
        $source = $this->method('up')->getSource();

        $source->addLine("\$this->table('{$table}')");
        foreach ($columns as $name => $type) {
            $source->addLine("    ->addColumn('{$name}', '{$type}')");
        }

        $source->addLine("    ->create();");

        $this->method('down')->getSource()->addString("\$this->table('{$table}')->drop();");
    }
public function declareCreation(string $table, array $columns)
    {
        $source = $this->method('up')->getSource();

        $source->addLine("\$this->table('{$table}')");
        foreach ($columns as $name => $type) {
            $source->addLine("    ->addColumn('{$name}', '{$type}')");
        }

        $source->addLine("    ->create();");

        $this->method('down')->getSource()->addString("\$this->table('{$table}')->drop();");
    }
public function declareCreation ( string $ table , array $ columns ) { $ source = $ this -> method ( 'up' ) -> getSource ( ) ; $ source -> addLine ( "\$this->table('{$table}')" ) ; foreach ( $ columns as $ name => $ type ) { $ source -> addLine ( "    ->addColumn('{$name}', '{$type}')" ) ; } $ source -> addLine ( "    ->create();" ) ; $ this -> method ( 'down' ) -> getSource ( ) -> addString ( "\$this->table('{$table}')->drop();" ) ; }
Declare table creation with specific set of columns

@param string $table
@param array  $columns
Declare table creation with specific set of columns