I would like to set Laravel and Carbon so that, based on the current locale selected by the user, dates will be formatted with the correct pattern. I thought it was enough to set LC_TIME on the desired locale and then use the Carbon method toDateString to get the correct format but, regardless the LC_TIME setted, it always return a date string in the format yyyy-mm-dd.
Expected results:
- If Italian selected, then mm/dd/yyyy
- If English selected, then yyyy-mm-dd
- and so on
I'm using Laravel 5.5 and Carbon 1.36.1