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

yijani's avatar

Get the date of the latest updated

I have Category with timestamps, I want to know how to get the date for the latest updated category, the same if it's a new created category.

(I want to display when the site was last updated based on the categories).

0 likes
3 replies
kenny11's avatar
kenny11
Best Answer
Level 4
Category::latest('updated_at')->first()->updated_at
1 like
yijani's avatar

Thank you guys. Both answer is right.

Please or to participate in this conversation.