![](/img/trans.png)
[英]Uploading image file through API using Symfony2 & FOSRESTBundle
[英]Symfony2 FosRestBundle root api url
為了開發我的API,我一直在查看FOS-Rest-Bundle文檔。 問題是我希望該API位於api /下,並且似乎沒有任何選擇可實現此目的。
有辦法嗎? 我該怎么做?
謝謝
您可以在路由中添加前綴。 參見http://symfony.com/doc/current/book/routing.html#prefixing-imported-routes
例如 :
api_rest:
type: rest
prefix: /api
resource: "@MyBundle/Resources/config/rest_routes.yml"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.