nedwave / rest-bundle
Nedwave Rest Bundle
Installs: 138
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Type:symfony-bundle
pkg:composer/nedwave/rest-bundle
This package has no released version yet, and little information is available.
README
Nedwave Rest Bundle
Installation
Install package with composer
"nedwave/rest-bundle": "*"
Register bundles in AppKernel
new Nedwave\RestBundle\NedwaveRestBundle(),
Update config.yml
framework
serializer:
enabled: true
Extend your controllers for use of the json action
<?php
namespace Acme\DemoBundle\Controller;
use Nedwave\RestBundle\Controller\RestController;
class DefaultController extends RestController
{
public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('AcmeDemoBundle:Post')->findAll();
return $this->json($entities);
}
}