lundi 26 décembre 2016

How to set language for Carbon?

So i want to set language for Carbon, but i always get same result.

  Carbon::setLocale('es');
$archive_current_year = Articles::whereBetween('created_at', [
    Carbon::now()->startOfYear(),
    Carbon::now()->endOfYear(),
  ])->get()->groupBy(function($item) {
    return $item->created_at->format('F');
  });



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire