I'm trying to set the same global locale of laravel which is :
config('app.locale')
to work with Carbon.
It seems like you can do it by using either :
Carbon::setLocale('fr')
or
setlocale(LC_TIME, 'theLocale');
So I have tried using middleware or providers but was not successful.
(why is this not a default feature of laravel?)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…