javascript - error with jsrouting-bundle symfony -


मैंने jsrouting-bundle स्थापित किया है, और यह मेरा कोड है:

जावास्क्रिप्ट:

  $ (document) .ready (function () {$ ("pmcontents")। Hide (); $ ("। Pmbox") क्लिक करें (फ़ंक्शन () {$ (this) .css ("फ़ॉन्ट-वजन", "सामान्य"); $ (यह) .next ()। टॉगल (); var myValue = $ ('this')। Attr ('id'); var डेटा = 'sentValue =' + MyValue; $ .ajax ({प्रकार: "POST", url: routing.generate ('isread'), डेटा: डेटा, कैश: गलत, सफलता: कार्य (डेटा) {चेतावनी ("डेटाबेस अद्यतन किया गया है");} });});});  

नियंत्रक:

  सार्वजनिक फ़ंक्शन isreadAction () {$ request = $ this- & gt; प्राप्त करें ('अनुरोध'); यदि ($ request- & gt; isXmlHttpRequest ()) {var_dump ($ अनुरोध- & amp;; अनुरोध- & gt; प्राप्त करें ('sentValue')); $ Em = $ this- & gt; getDoctrine () - & gt; getEntityManager (); $ Pm = $ this- & gt; getDoctrine () - & gt; getRepository ('लॉग इन लॉगिन बंडल: निजी संदेश)' - & gt; FindBypmid ($ अनुरोध- & amp;; अनुरोध- & gt; प्राप्त करें ('sentValue')); $ बजे & gt; setIsRead (सही); $ Em- & gt; फ्लश (); नया रिटर्न () लौटें; }}  

रूटिंग:

  isread: path: / game / isread डिफ़ॉल्ट: {_controller: LoginLoginBundle: Default: isread} आवश्यकताएं: _method: POST < / Code> 

मुझे अपने कंसोल में निम्न त्रुटि मिलती है: μ

  त्रुटि: मार्ग "आइल्रेड" मौजूद नहीं है।  

इसलिए मुझे नीचे दी गई छवियों के साथ मेरी समस्या होनी चाहिए, हालांकि मुझे नहीं पता कि मैंने क्या किया है।

त्रुटियाँ

आपको बेनकाब मार्ग की जरूरत है, जैसे:

  isread: path: / game / isread डिफ़ॉल्ट: {_controller: LoginLoginBundle: Default: isread} आवश्यकताएं : _method: POST विकल्प: # & lt; इन दोनों को उजागर करें: सत्य # & lt; लाइनें  


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -