D
D
Dmitry Gusev2021-09-15 23:02:53
Laravel
Dmitry Gusev, 2021-09-15 23:02:53

How to get date from mysql in Laravel?

The site is a news portal based on Laravel 8.
The database stores all article data, including the date. Date in the format yyyy-mm-dd.

How to display the date in the "view" (views.blade.php) in the following format:
- Separate month in the format "September"
- Separate day of the month in the format "15"
- Separate year in the format "2021"

Separately needed for the site template, there day, month, year in separate divs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2021-09-15
@dm_gusev

https://laravel.com/docs/8.x/eloquent-mutators#dat... + https://carbon.nesbot.com/docs/#api-getters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question