#28 - holidays management

This commit is contained in:
Adrian Hopek
2022-01-24 14:03:39 +01:00
parent 6854c7a9f8
commit 29d81030ac
20 changed files with 792 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ namespace Toby\Providers;
use Illuminate\Support\Carbon;
use Illuminate\Support\ServiceProvider;
use Toby\Models\Holiday;
use Toby\Models\VacationLimit;
use Toby\Scopes\SelectedYearPeriodScope;
@@ -15,6 +16,9 @@ class AppServiceProvider extends ServiceProvider
{
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("j F Y"));
VacationLimit::addGlobalScope($this->app->make(SelectedYearPeriodScope::class));
$selectedYearPeriodScope = $this->app->make(SelectedYearPeriodScope::class);
VacationLimit::addGlobalScope($selectedYearPeriodScope);
Holiday::addGlobalScope($selectedYearPeriodScope);
}
}