3

I'm following this guide in order to create a RESTFUL api: http://williamdurand.fr/2012/08/02/rest-apis-with-symfony2-the-right-way/

In POST section, it uses object User as input of its edit method. I'm trying to do the same with my controller class, but I'm getting the following error:

Unable to guess how to get a Doctrine instance from the request information

Can somebody help me? Thank you

Update:

Now the definition of the method looks like this:

  /**
   * @Route("/rest/categories/{id}")
   * @ParamConverter("category", class="TouristAppCoreBundle:Category")
   * @Template()
   */
  public function rest_editAction(Category $category)
4

0 に答える 0