/** * Show the form for editing the specified resource. * * @param App\RoomType $roomType * @return Response */ public function edit(RoomType $roomType) { $facilities = Facility::orderBy('name', 'asc')->get(); $room_facilities = $roomType->facilities()->lists('facility_id'); return view('type.edit', compact('roomType', 'facilities', 'room_facilities')); }