public function assign_rooms($id) { //get this retreat's information $retreat = \montserrat\Retreat::with('retreatmasters', 'assistant', 'innkeeper', 'captains')->findOrFail($id); $registrations = \montserrat\Registration::where('event_id', '=', $id)->with('retreatant.parish')->orderBy('register_date', 'DESC')->get(); $rooms = \montserrat\Room::orderby('name')->pluck('name', 'id'); $rooms->prepend('Unassigned', 0); return view('retreats.assign_rooms', compact('retreat', 'registrations', 'rooms')); }