Build a REST API Fastest and Easiest Way

Mert Öksüz
Aug 20, 2017 · 1 min read
$bundles = array(
// ...
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle($this),
new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
new Nedra\RestBundle\NedraRestBundle(),
// ...
Class Book {
private $id;
private $name;
private $author;
model: AppBundle\Entity\Book
bin/console debug:router
app_book_index             GET         ANY      ANY    /books/                            
app_book_create POST ANY ANY /books/new
app_book_update PUT|PATCH ANY ANY /books/{id}
app_book_show GET ANY ANY /books/{id}
app_book_delete DELETE ANY ANY /books/{id}

Mert Öksüz

Written by

Software Architect at

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade