toby/app/Architecture/Providers/AppServiceProvider.php
Adrian Hopek a37be18da6 #43 - wip
2022-03-01 12:36:00 +01:00

18 lines
409 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Architecture\Providers;
use Illuminate\Support\Carbon;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("j F Y"));
Carbon::macro("toDisplayDate", fn() => $this->translatedFormat("d.m.Y"));
}
}