Answers for "laravel default other column migration"

PHP
3

laravel migration default value

$table->increments('id');
            $table->string('name');
            $table->string('url');
            $table->string('country');
            $table->tinyInteger('status')->default('1');
            $table->timestamps();
Posted by: Guest on July-20-2021
0

how assign default value to laravel migration column

You can use change() method:

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

Code answers related to "laravel default other column migration"

Browse Popular Code Answers by Language