logo

When might you want to skip updating model timestamps?

Not every change is a real modification

Joel Clermont
Joel Clermont
2026-02-03

Every time you save an Eloquent model, Laravel updates the updated_at timestamp. Usually that's what you want, but not always.

For example, let's say your making a change to how data is stored in a JSON array column.

// before
$jsonField = ['is_premium' => 1];

// after
$jsonField = ['is_premium' => true];

You're going to run a conversion command to update all existing values to this new format.

But, now every single model will have a new updated_at value as well.

Is that really an "update" to the model? I say it's not. The content hasn't changed at all. This is just a technical implementation detail.

Laravel has a solution: withoutTimestamps.

use Illuminate\Database\Eloquent\Model;

Model::withoutTimestamps(
    // your conversion logic here
);

Inside the closure, any model operations skip the timestamp update.

Now you can be intentional about what counts as a real modification.

Here to help,

Joel

P.S. The next time you're struggling with a problem, don't forget that the community and Get Unstuck sessions are here to help you out.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice.