public function cancel($id)
 {
     $registration = \montserrat\Registration::findOrFail($id);
     $registration->canceled_at = \Carbon\Carbon::now();
     $registration->save();
     return Redirect::back();
 }
Exemplo n.º 2
0
 public function room_update(Request $request)
 {
     //
     //dd($request);
     $this->validate($request, ['retreat_id' => 'integer|min:0']);
     if (null !== $request->input('registrations')) {
         foreach ($request->input('registrations') as $key => $value) {
             $registration = \montserrat\Registration::findOrFail($key);
             $registration->room_id = $value;
             $registration->save();
             //dd($registration,$value);
         }
     }
     if (null !== $request->input('notes')) {
         foreach ($request->input('notes') as $key => $value) {
             $registration = \montserrat\Registration::findOrFail($key);
             $registration->notes = $value;
             $registration->save();
             //dd($registration,$value);
         }
     }
     return Redirect::action('RetreatsController@index');
 }