diff --git a/skolehjem/app/Http/Controllers/WashingReservationController.php b/skolehjem/app/Http/Controllers/WashingReservationController.php index a028c66..72395d8 100644 --- a/skolehjem/app/Http/Controllers/WashingReservationController.php +++ b/skolehjem/app/Http/Controllers/WashingReservationController.php @@ -73,7 +73,9 @@ class WashingReservationController extends Controller ]); }else{ $reservations = WashingReservation::query()->paginate($request->input("limit", 20)); - return Response::detect("washing-machines.index", ['reservations' => $reservations]); + $machines = WashingMachine::all(); + + return Response::detect("washing-machines.index", ['reservations' => $reservations, 'machines' => $machines]); } } @@ -132,7 +134,9 @@ class WashingReservationController extends Controller ]); }else{ $reservations = WashingReservation::query()->paginate($request->input("limit", 20)); - return Response::detect("washing-machines.index", ['reservations' => $reservations]); + $machines = WashingMachine::all(); + + return Response::detect("washing-machines.index", ['reservations' => $reservations, 'machines' => $machines]); } }