symfony - Symfomy2 get url parameter in routing condition -


i trying set following route

/**  * @route(  *      "/api/list/{setname}/{order}",  *      condition= "request.get('order') == 'something' "  *  * )  */ 

but can produce 404s because condition never true although pass in order argument. guess "request.get('order')" part wrong, how it?

try

       condition= "request.query.get('order') == 'something' " 

instead of

       condition= "request.get('order') == 'something' " 

check more here , here


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -