laravel add column to table
snippet in php

add another field in existing migration laravel

user7541

php artisan make:migration add_paid_to_users_table --table=users

laravel add column to table

user9599

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

add column to migration laravel

user7238

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']);
        });
    }
}

laravel rename table

user4679

Schema::rename($currentTableName, $newTableName);

add new column in laravel migration

user4393

Schema::table('table_name', function (Blueprint $table) {
            $table->string('column_name', 255)->nullable()->after('previous_column_name');
        });

laravel add column to table

user3790

// The table method on the Schema facade MAY BE USED TO UPDATE EXISTING TABLES.
// The table method accepts two arguments: the name of the table and a Closure
// that receives a Blueprint instance you may use to add columns to the table:
Schema::table('users', function (Blueprint $table) {
    $table->string('email');
});