how to set the string value while migratiuon time in laravel code example
Example 1: laravel before migration
Schema::table('users', function ($table) {
$table->string('email')->after('id')->nullable();
});
Example 2: datetime-local laravel migration data type
public function getDateStartAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}
public function getDateEndAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}