Commit 684b5e3b authored by Mat's avatar Mat

FOSjsRouting, 2 manière d'exposer les routes

tester dans debug console :
* Routing.generate('api_owner_read')
* Routing.generate('api_owner_read', true)
* Routing.generate('api_owner_read_one', {'id': 1} ,true)
parent fc68bf45
......@@ -70,3 +70,11 @@ swiftmailer:
username: '%mailer_user%'
password: '%mailer_password%'
spool: { type: memory }
# FOSjsRouting Configuration
fos_js_routing:
routes_to_expose:
- api_owner_read
- api_owner_read_one
- api_image_update
- api_owner_create
......@@ -3,6 +3,8 @@ api_owner_read:
defaults:
_controller: APIBundle:Owner:read
methods: [ GET ]
options:
expose: true # façon crade d'esposer la route
api_owner_read_one:
path: /owner/{id}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment