How to save null value into date column format? I am having trouble when trying to update date column with null value. I found that null value unable to override the value stored in the date column. How can i update it with null value?
As long as the column in your database table is nullable this shouldn't be a problem.
My table already set to nullable, but it doesn't taking any effect. It will auto set to today's date.
no, is another date column
So post your model and code where are you trying to update it.
It's just simple date format column. Already set ->nullable()->default(null) for table.
$track = new Track();
$track->parcel_delivery_date = null; // when i pass null it will automatic set as today's date
$track->save()
Just something like.
And where is your code for model?
Please sign in or create an account to participate in this conversation.