public function update(CalendarRequest $request, Calendar $calendar)
    {
        try {

            $attributes = $request->all();

            $calendar->update($attributes);
            return response()->json([
                'message'  => trans('messages.success.updated', ['Module' => trans('calendar::calendar.name')]),
                'code'     => 204,
                'redirect' => trans_url('/admin/calendar/calendar/'),
            ], 201);

        } catch (Exception $e) {

            return response()->json([
                'message'  => $e->getMessage(),
                'code'     => 400,
                'redirect' => trans_url('/admin/calendar/calendar/'),
            ], 400);

        }

    }