laravel migration change column name
snippet in php

laravel migration change column name

user6834

Schema::table('users', function (Blueprint $table) {
    $table->renameColumn('from', 'to');
});

laravel migration change column type

user8438

public function up()
{
    Schema::table('sometable', function (Blueprint $table) {
        $table->text('text')->change();
    });
}

laravel create migration

user9586

php artisan make:migration add_votes_to_users_table --table=users

php artisan make:migration create_users_table --create=users