Answers for "laravel default table columsn"

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
0

set default value for column in laravel model

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

Browse Popular Code Answers by Language