Answers for "alter column defult value migration laravel"

PHP
0

laravel migration change column default

Schema::table('users', function ($table) {
    $table->integer('active')->default(0)->change();
});
Posted by: Guest on June-03-2021
6

laravel migration update table column type

Schema::table('users', function ($table) {
    $table->string('name', 50)->change();
});
We could also modify a column to be nullable:

Schema::table('users', function ($table) {
    $table->string('name', 50)->nullable()->change();
});
Posted by: Guest on July-31-2021

Code answers related to "alter column defult value migration laravel"

Browse Popular Code Answers by Language