L
L
lolrofl012018-08-04 09:20:55
Laravel
lolrofl01, 2018-08-04 09:20:55

How in laravel to force the date to be displayed immediately in the desired format?

In the database, the date has the following form: year-month-day. And the site is displayed everywhere in the format day-month-year. At the moment, before each date output, I have to go to Carbon and translate the date into the correct format. Is there any function in the lara that would automatically change the date to the required format with each selection from the database?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gleb Starkov, 2018-08-04
@lolrofl01

https://laravel.com/docs/5.6/eloquent-mutators Date Formats

E
Eugene Voron, 2022-03-21
@jack160482

You can see here: https://laravel.demiart.ru/config-date-format/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question