public function readNotifications(Request $request)
    {
        if (!$request->isXmlHttpRequest()) {
            $this->app->abort(400);
        }

        try {
            $this->getEventsManager()->read(
                explode('_', (string) $request->request->get('notifications')),
                $this->getAuthenticatedUser()->getId()
            );

            return $this->app->json(['success' => true, 'message' => '']);
        } catch (\Exception $e) {
            return $this->app->json(['success' => false, 'message' => $e->getMessage()]);
        }
    }
public function readNotifications(Request $request)
    {
        if (!$request->isXmlHttpRequest()) {
            $this->app->abort(400);
        }

        try {
            $this->getEventsManager()->read(
                explode('_', (string) $request->request->get('notifications')),
                $this->getAuthenticatedUser()->getId()
            );

            return $this->app->json(['success' => true, 'message' => '']);
        } catch (\Exception $e) {
            return $this->app->json(['success' => false, 'message' => $e->getMessage()]);
        }
    }
public function readNotifications ( Request $ request ) { if ( ! $ request -> isXmlHttpRequest ( ) ) { $ this -> app -> abort ( 400 ) ; } try { $ this -> getEventsManager ( ) -> read ( explode ( '_' , ( string ) $ request -> request -> get ( 'notifications' ) ) , $ this -> getAuthenticatedUser ( ) -> getId ( ) ) ; return $ this -> app -> json ( [ 'success' => true , 'message' => '' ] ) ; } catch ( \ Exception $ e ) { return $ this -> app -> json ( [ 'success' => false , 'message' => $ e -> getMessage ( ) ] ) ; } }
Set notifications as read

@param  Request $request
@return JsonResponse
Set notifications as read