Open your command console, browse to your project and execute the following:
$ composer require vlabs/address-bundle
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Vlabs\AddressBundle\VlabsAddressBundle(),
);
}
// app/config/config.yml
imports:
- { resource: "@VlabsAddressBundle/Resources/config/packages/tbbc_rest_util.yml" }
...
# app/config/config.yml
// ...
fos_rest:
format_listener:
enabled: true
rules:
- { path: '^/address/*', priorities: ['json'], fallback_format: 'html' }
- { path: '^/', priorities: ['html'] }
view:
view_response_listener: force
# app/config/routing.yml
// ...
vlabs_address:
resource: "@VlabsAddressBundle/Resources/config/routing.yml"
prefix: /address
$ app/console vlabs:address:install