Hello guys,
I'm making an API using Laravel. In one of my scripts, I make an update on a field, like this :
user::where('uuid', $uuid)->update(['date' => $date]);
I noticed that the primary key increments when doing this. My obvious conclusion is that Eloquent makes a delete - insert in place of a regular MySQL update.
And so the question is, why ?
Thanks ahead.
It's not possible that this line of code will update id your records. Whenever you thing something strange happens in your application (not only in Laravel), you should:
user
modelIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With