Open eugenemusienko opened 2 years ago
I have the same problem. I believe the reason is that DaDataServiceProvider extends Carbon\Laravel\ServiceProvider. Instead it should extend Illuminate\Support\ServiceProvider. Cannot find workaround
I found workaround. Add new provider
<?php
declare(strict_types=1);
namespace App\Providers;
use Carbon\Laravel\ServiceProvider;
final class CarbonServiceProvider extends ServiceProvider
{
}
then register it in config/app.php. Thats all, Carbon localization works now
When installing the package, the Russian localization of Carbon breaks down.
'locale' => 'ru'
$date = Carbon::now(); $dayName = $date->getTranslatedDayName(); // 'Monday', but without the package it would be 'Понедельник'