with(["user", "vacationRequest"]) ->whereDate("date", $date) ->approved() ->whereTypes(VacationType::all()->filter(fn(VacationType $type): bool => $this->configRetriever->isVacation($type))) ->get(); } public function getRemoteDays(Carbon $date): Collection { return Vacation::query() ->with(["user", "vacationRequest"]) ->whereDate("date", $date) ->approved() ->whereTypes(VacationType::all()->filter(fn(VacationType $type): bool => !$this->configRetriever->isVacation($type))) ->get(); } public function getBirthdays(Carbon $date): Collection { return User::query() ->whereRelation("profile", "birthday", $date) ->get(); } }