3

I have a slight Problem with on of my Controllers.

The Entity the api is for is called: MyEntity so naturally the controller is called: MyEntityController

If I now define an action: public function getMyEntity($id) the route that is generated is called: /mys/:id/entitys

How do I define the controller in a way that the route becomes /my-entities/:id ?

gries
  • 1,135
  • 6
  • 29

1 Answers1

1

Why don't you define the route manually the way you want?: http://symfony.com/doc/current/bundles/FOSRestBundle/7-manual-route-definition.html

gvf
  • 1,039
  • 7
  • 6