Я хочу полностью изменить формат даты и времени в Laravel на португальский. Уже пытались измениться по-разному и не удалось. Я изменил форматы, используя Carbon dddd, MMMM D, YYYY h: mm A, и не смог
! [Я хочу, чтобы это было так] 1
UserController.php
$dL = [];
$dV = [];
foreach(array_reverse($stack) as $d) {
$dL[]. = Date::parse($d)->format('dS M');
}
foreach(array_reverse($stack) as $d) {
$date = Carbon::parse($d)->format('Y-m-d');
$start = $date.
' '.
'00:00:00';
$end = $date.
' '.
'23:59:59';
$dC = Signal::whereBetween('created_at', [$start, $end])->get();
$dV[]. = count($dC);
}
$data['dV'] = $dV;
$data['dL'] = $dL;
return view('user.dashboard', $data);
}
signal-all.blade.php
@php
$p = 0;
@endphp
@foreach($signal as $k => $p)
<tr>
<td>{{ $k + $signal->firstItem() }}</td>
<td>{{\Jenssegers\Date\Date::parse($p->created_at)->format('dS M, Y - h:i:s A')}}</td>
<td>{{ $p->signal->title }}</td>
<td>{{ $p->signal->asset->name }} - {{ $p->signal->symbol->name }} - {{ $p->signal->type->name }}</td>
<td>{{ $p->signal->frame->name }} - {{ $p->signal->status->name }}</td>
App.php
'timezone' => 'America/Sao_Paulo',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'pt',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'pt',