/**
  * Remove the calendar.
  *
  * @param Request $request
  * @param Model   $calendar
  *
  * @return json
  */
 public function destroy(CalendarAdminApiRequest $request, Calendar $calendar)
 {
     try {
         $t = $calendar->delete();
         return response()->json(['message' => trans('messages.success.delete', ['Module' => trans('calendar::calendar.name')]), 'code' => 2006])->setStatusCode(202, 'DESTROY_SUCCESS');
     } catch (Exception $e) {
         return response()->json(['message' => $e->getMessage(), 'code' => 4006])->setStatusCode(400, 'DESTROY_ERROR');
     }
 }
 /**
  * Remove the calendar.
  *
  * @param Model   $calendar
  *
  * @return Response
  */
 public function destroy(CalendarAdminRequest $request, Calendar $calendar)
 {
     try {
         $t = $calendar->delete();
         return response()->json(['message' => trans('messages.success.deleted', ['Module' => trans('calendar::calendar.name')]), 'code' => 202, 'redirect' => trans_url('/admin/calendar/calendar/0')], 202);
     } catch (Exception $e) {
         return response()->json(['message' => $e->getMessage(), 'code' => 400, 'redirect' => trans_url('/admin/calendar/calendar/' . $calendar->getRouteKey())], 400);
     }
 }