toby/app/Providers/AppServiceProvider.php
Adrian Hopek e147d24365
#23 - collective editing vacation days (#26)
* #23 - wip

* #23 - wip

* #23 - wip

* #23 - wip

* #23 - fix

* #23 - ecs fix

* #23 - fix

* #23 - fix

* #23 - cr fix
2022-01-24 11:28:00 +01:00

21 lines
476 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Providers;
use Illuminate\Support\Carbon;
use Illuminate\Support\ServiceProvider;
use Toby\Models\VacationLimit;
use Toby\Scopes\SelectedYearPeriodScope;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("j F Y"));
VacationLimit::addGlobalScope($this->app->make(SelectedYearPeriodScope::class));
}
}