Answers for "laravel creating a data on table o default value in cretated"

PHP
5

laravel migration set default value

$table->string('name')->default('Hello World!');
Posted by: Guest on May-12-2020
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 "laravel creating a data on table o default value in cretated"

Browse Popular Code Answers by Language