Answers for "default value in laravel migration"

PHP
5

laravel migration set default value

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

laravel migration change default value

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

laravel migration change column default

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

set default value for column in laravel model

protected $attributes = [ 
	'your_field_name' => 'default value' 
];
Posted by: Guest on July-23-2021

Code answers related to "default value in laravel migration"

Browse Popular Code Answers by Language