middleware('maintenance_mode'); $this->userNotificationSettingService = $userNotificationSettingService; } public function index() { try { $userNotificationSettings = $this->userNotificationSettingService->getByAuthUser(auth()->id()); return view('generalsetting::user_notifications.index', compact('userNotificationSettings')); } catch (Exception $e) { LogActivity::errorLog($e->getMessage()); Toastr::error(__('common.Something Went Wrong')); return back(); } } public function update(Request $request, $id) { try { $this->userNotificationSettingService->update($request, $id); LogActivity::successLog('User notification updated successful.'); } catch (Exception $e) { LogActivity::errorLog($e->getMessage()); Toastr::error(__('common.Something Went Wrong')); return back(); } } }