migration add new column to existing table in laravel 6 code example

Example 1: add new column in existing table in laravel migration

public function down()
{
    Schema::table('users', function($table) {
        $table->dropColumn('paid');
    });
}

Example 2: laravel 6 migration add column to existing table

migration add column to existing table in laravel 6

Example 3: migration add new column to existing table in laravel 6

migration add new column to existing table in laravel 6

Example 4: schema add column laravel

Schema::table('users', function($table) {
    $table->string("title");
    $table->text("description");
    $table->timestamps();
});

Tags:

Php Example