From 248e2ea430bf450baa166b7c275bc1cd7a41beab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=ADque=20de=20Castro=20Soares=20da=20Silva?= Date: Sun, 26 May 2024 06:59:49 -0300 Subject: [PATCH] fix: get room types as full collection --- app/Http/Controllers/RoomsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/RoomsController.php b/app/Http/Controllers/RoomsController.php index 6655c15..944bb46 100644 --- a/app/Http/Controllers/RoomsController.php +++ b/app/Http/Controllers/RoomsController.php @@ -38,7 +38,7 @@ public function index(Request $request) public function create() { $features = Feature::all(); - $types = \App\Type::pluck('name', 'id'); + $types = \App\Type::all(); return view('rooms.create', compact('features', 'types')); } @@ -86,7 +86,7 @@ public function edit($id) { $room = Room::findOrFail($id); $features = Feature::all('name', 'id'); - $types = \App\Type::pluck('name', 'id'); + $types = \App\Type::all(); return view('rooms.edit', compact('room', 'features', 'types')); }