Laravel 中的德国人如何与碳共度一天?
How get a day with a carbon by German in Laravel?
Laravel 中的德国人如何用碳度过一天?
尝试:
return $item->formatLocalized('%A, %d.%m.%Y %H:%M');
需要:
Montag, 17.04.2017 10:00
A quick Google and look at the Carbon Official Documentation shows me that it will either assume using the locale in PHP (setlocale
)。或者您可以使用静态方法手动设置它 setLocale()
.
Carbon::setLocale('de');
你把这个放在 bootstrap/app 上了吗?php
setlocale(LC_TIME, 'German');
Laravel 中的德国人如何用碳度过一天?
尝试:
return $item->formatLocalized('%A, %d.%m.%Y %H:%M');
需要:
Montag, 17.04.2017 10:00
A quick Google and look at the Carbon Official Documentation shows me that it will either assume using the locale in PHP (setlocale
)。或者您可以使用静态方法手动设置它 setLocale()
.
Carbon::setLocale('de');
你把这个放在 bootstrap/app 上了吗?php
setlocale(LC_TIME, 'German');