/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     //
     $registration = \montserrat\Registration::findOrFail($id);
     $retreat = \montserrat\Retreat::findOrFail($registration->event_id);
     \montserrat\Registration::destroy($id);
     $countregistrations = \montserrat\Registration::where('event_id', '=', $registration->event_id)->count();
     //$retreat->attending = $countregistrations;
     $retreat->save();
     return Redirect::action('RegistrationsController@index');
 }
 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'));
 }