Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brack's avatar
Level 1

How do you get the updated_at date for only certain fields

I am trying to add a date to a form that shows when only specific fields are edited. I can display the updated_at date , but that changes when any edit is made and only need it to change when certain fields are updated and remain the same if not. I am brand new to using Laravel and any help would be appreciated.

0 likes
3 replies
ralphmorris's avatar
Level 7

Try adding another dateTime field where you would store the timestamp of when you updated your specific information?

I'd probably leave the actual updated_at field as it can sometimes come in handy down the line.

jdunsmore's avatar

Like @ralphmorris said.

Create another field in your database with a sensible name and then whenever you update the fields you want it to trigger then update that field in the database also..

2 likes

Please or to participate in this conversation.