Nwidart\Modules\Support\Migrations\SchemaParser::up PHP Method

up() public method

Render up migration fields.
public up ( ) : string
return string
    public function up()
    {
        return $this->render();
    }

Usage Example

コード例 #1
0
    /** @test */
    public function it_generates_migration_methods_for_up_method()
    {
        $parser = new SchemaParser('username:string, password:integer');
        $expected = <<<TEXT
\t\t\t\$table->string('username');
\t\t\t\$table->integer('password');

TEXT;
        self::assertEquals($expected, $parser->up());
    }