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.

fos rest routing


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -