/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $congregation = Congregation::get_congregation($id);
     $deleted_message = 'Congregation "' . $congregation->name . '" has been deleted successfully.';
     Congregation::destroy_congregation($id);
     return redirect('congregations')->withSuccess($deleted_message);
 }
示例#2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $attendance = Attendance::get_attendance($id);
     $congregation = Congregation::get_congregation($attendance->congregation_id);
     $deleted_message = 'Attendance for "' . $congregation->name . '" on ' . $attendance->service_date . ' has been deleted successfully.';
     Attendance::destroy_attendance($id);
     return redirect('attendances')->withSuccess($deleted_message);
 }