This commit is contained in:
Adrian Hopek 2022-03-01 12:47:51 +01:00
parent bdbb183b7d
commit ac81882b3f

View File

@ -67,9 +67,10 @@ class VacationRequestController extends Controller
$yearPeriod = $yearPeriodRetriever->selected(); $yearPeriod = $yearPeriodRetriever->selected();
$users = User::query() $users = User::query()
->whereRelation("vacationlimits", fn(Builder $query) => $query ->whereRelation(
->where("year_period_id", $yearPeriod->id) "vacationlimits",
->whereNotNull("days")) fn(Builder $query) => $query->where("year_period_id", $yearPeriod->id)->whereNotNull("days"),
)
->orderBy("last_name") ->orderBy("last_name")
->orderBy("first_name") ->orderBy("first_name")
->get(); ->get();