symfony - FOSRestBundle route -
i use symfony2.2 , fosrestbundle
i set
#app/config/config/yml myapp_rest: resource: "@myapprestbundle/resources/config/routing.yml" type: rest prefix: /v1
and
#src/myapp/restbundle/resources/config/routing.yml user: resource: myapp\restbundle\controller\usercontroller type: rest
my usercontroller extends fosrestcontroller , have method cgetaction()
, newaction()
. , when try router:debug, route shows:
.. symfony routes ..
get /v1/{id}.{_format} new /v1/new.{_format}
what expected, according docs, like
"get_users" [get] /users
what missing?
i suggest read routing docs. if want /users have use getusersaction:
public function getusersaction() {} // "get_users" [get] /users
otherwise read implicit resource name definition section.
Comments
Post a Comment