What does your migration SQL output look like? Is there anything like ON UPDATE CURRENT_TIMESTAMP on that column?
Mutated date columns being set to current timestamp
I have an Eloquent model with an attribute included in the $dates array. For some reason, I’m having a problem with the value of this column sometimes being persisted as the current timestamp when the model is saved, so that it ends up matching 'updated_at' exactly. I’ve seen this happen in two different models in two different Laravel apps I maintain recently, and in both cases I can’t track down the cause of this for the life of me. Neither applications have a usage that would ever explicitly set this attribute value to the current time, so I'm wondering if there's something about how Eloquent mutates dates that I just don't understand. Does anyone know what may be causing this? Thanks!
Please or to participate in this conversation.