Answers for "set default in laravel eloquent migration"

PHP
2

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
1

laravel migration change default value

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

Code answers related to "set default in laravel eloquent migration"

Browse Popular Code Answers by Language