N
N
Nikita Dergachov2017-09-28 18:59:01
Laravel
Nikita Dergachov, 2017-09-28 18:59:01

How to make such date format in Carbon?

There is a difference between the dates
$diff = $dateTime->diff($now);
You need to get the difference of the form: X days Y hours Z minutes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
amorphine, 2017-09-28
@vanillathunder

Take a look at the $diff properties, you'll be pleasantly surprised

K
Konstantin Malyarov, 2017-09-28
@Konstantin18ko

{{Carbon\Carbon::parse($dateTime->diff($now))->format('d/m/Y')}}
Not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question