notificationsRepository = $notificationsRepository; } public function notificationListing(Request $request) { $response = []; try { $response = $this->notificationsRepository->notificationListing($request->all()); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function deleteNotification($id) { $response = []; try { $response = $this->notificationsRepository->deleteNotification($id); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function deleteAllNotifications() { $response = []; try { $response = $this->notificationsRepository->deleteAllNotifications(); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function pushNotificationRegister(Request $request) { $response = []; try{ $response = $this->notificationsRepository->pushNotificationRegister($request); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function deleteUserToken(Request $request) { $response = []; try{ $response = $this->notificationsRepository->deleteUserToken($request); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function deleteExistingToken(Request $request) { $response = []; try{ $response = $this->notificationsRepository->deleteExistingDeviceToken($request); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } public function getUnreadCounts() { $response = []; try{ $response = $this->notificationsRepository->getUnreadCounts(); $this->setStatusCode($response['status']); } catch (\Exception $ex) { Log::error($ex); $this->setStatusCode(Constant::CODE_403); } return $this->respond($response); } }