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

kendrick's avatar

How to change date format within view? (->diffForHumans())

Hello, Is it possible to adjust values such as:

'time'=> 'date_format:H:i|max:140',
'timend'=> 'date_format:H:i|max:140',
'date'=> 'required|date_format:Y-m-d',
'datend'=> 'required|date_format:Y-m-d',

within my view into more User-friendly formats?

View

{{$user->time}}

will result in e.g. 12:00:00

Is there something like: created_at->diffForHumans() for the formats I am using? Thank you

0 likes
1 reply

Please or to participate in this conversation.