laravel migration add column to existing table
snippet in php

laravel migration add column to existing table

user962

php artisan make:migration add_paid_to_users_table --table=users
  
public function up()
{
    Schema::table('users', function($table) {
        $table->integer('paid');
    });
}

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

php artisan migrate

add another field in existing migration laravel

user2603

php artisan make:migration add_paid_to_users_table --table=users

laravel add column to table

user5453

Schema::table('users', function (Blueprint $table) {
	$table->dateTime('verify_date')->nullable()->after("password_updated_at");
});

add column to migration laravel

user9567

class AddProfileToUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('profile')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('shop_users', function (Blueprint $table) {
            $table->dropColumn(['profile']);
        });
    }
}

add column to migration laravel

user8043

php artisan make:migration add_profile_to_users