Skip to content

Instantly share code, notes, and snippets.

@merltron-pa
Last active November 25, 2020 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merltron-pa/31a98d0ff855e37340b441123633daa9 to your computer and use it in GitHub Desktop.
Save merltron-pa/31a98d0ff855e37340b441123633daa9 to your computer and use it in GitHub Desktop.
PHP / JMS Article: Final Step
<?php
...
class TestAddressController extends AbstractFOSRestController
{
/**
* @Route("/test/address", methods={"POST"})
* @ParamConverter("address", converter="fos_rest.request_body")
*/
public function post(Address $address): Response
{
return $this->handleView($this->view($address));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment