Answers for "laravel migration alter existing column to have default value migration"

PHP
5

laravel migration set default value

$table->string('name')->default('Hello World!');
Posted by: Guest on May-12-2020
0

laravel migration change column default

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

Code answers related to "laravel migration alter existing column to have default value migration"

Browse Popular Code Answers by Language