2017-08-30 1 views

Antwort

0

Datum Zeitformat ist standardmäßig Carbon-Instanz in Laravel

Carbon::setLocale('de'); // set the locale 
{{ $article->created_at->format('d M Y') }} 
+0

ich in meinem LocaleMiddleware haben 'public function handle ($ request, Closure $ next) { $ locale = self :: getLocale (); if ($ locale) App :: setLocale ($ locale); sonst App :: setLocale (Config :: get ('app.locale')); Carbon :: setLocale ($ locale); return $ next ($ Anfrage); } ' Aber es ist jetzt Arbeit – korg

+0

funktioniert es jetzt? – StateLess

+0

Nein. In Carbon Doc geschrieben, wie man das Datum übersetzt. Aber ich überprüfte alle Sprachen, und die meisten funktionieren nicht. Und am wahrscheinlichsten ist das Problem im Kohlenstoff – korg

Verwandte Themen