In Laravel 5.4, in .env
I have:
APP_LOCALE=es
APP_FALLBACK_LOCALE=en
APP_LOCALE_PHP=es_US
and in config/app.php
:
'locale' => env('APP_LOCALE', 'es'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'locale_php' => env('APP_LOCALE_PHP', 'en_US'),
But I want to set as spanish. For example, In a controller I have:
$mydate = date('d F Y', strtotime($data->created));
$data->created
is a string that comes from database, from column created_at
. This way it show as:
14 August 2017
English, so ¿how can I get it in spanish?
I test APP_LOCALES with es
nothing happens. I tried to setlocale(LC_TIME, "es");
right before the $mydate, and it's the same. I'm saving the changes and doing php artisan config:cache
by the way.