createVacationLimitsFor($yearPeriod); $this->createHolidaysFor($yearPeriod); } protected function createVacationLimitsFor(YearPeriod $yearPeriod): void { $users = User::all(); foreach ($users as $user) { $yearPeriod->vacationLimits()->create([ "user_id" => $user->id, ]); } } protected function createHolidaysFor(YearPeriod $yearPeriod): void { $holidays = $this->polishHolidaysRetriever->getForYearPeriod($yearPeriod); foreach ($holidays as $holiday) { $yearPeriod->holidays()->create([ "name" => $holiday["name"], "date" => $holiday["date"], ]); } } }