Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jeremy Curny:
Symfony 3 - REST API
Apr 04, 2016 @ 18:19:26

In this post to his site Jeremy Curny briefly walks you through the creation of a REST API using the Symfony 3 framework and several components/bundles to add in common functionality.

He includes the commands and dependencies you'll need to get the system set up:

  • Initialize the project
  • Install dependencies (including the FosRestBundle, JMSSerializerBundle and NelmioCorsBundle bundles)
  • Register bundles
  • Configure bundles
  • Making the first route

He ends with the command to run the built-in web server and be able to test out the result. The simple action he's created can then be called using a GET request on the default/index route with a 200 OK response with "hello world" content.

tagged: symfony3 symfony framework tutorial rest api project

Link: http://jeremycurny.com/2016/03/27/symfony3-rest-api/


Trending Topics: