laravel migration why is datetime in name code example
Example 1: 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');
}
Example 2: how to use datetime.now in migration laravel
Laravel Migration Datetime Now