// MySomethingController.phpFOSRestBundle प्राप्त URL में 'एस' कहते हैं
// look no s
public function getSomethingAction($args)
{
...
}
// routing.yml
my_something:
type: rest
resource: Blah\Bundle\BlahBundle\Controller\MySomethingController
चल:
php app/console router:debug
आउटपुट:
[router] Current routes
Name Method Pattern
get_something GET /somethings/{args}.{_format}
'कुछ' के बजाय मार्ग 'somethings' (एक 'के साथ बहुवचन) क्यों है?
क्या यह एक सेटिंग है जहां कहीं कहीं है? या यह उम्मीद है?
प्रलेखन का कहना है कि सही है: https : //github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/5-automatic-route-generation_single-restful-controller.md, ('getUserAction' विधि देखें।) – eagleoneraptor
@eagleoneraptor उन्होंने इसे कॉन्फ़िगर किया है उपयोगकर्ताओं का उपयोग 'एस' # एप/कॉन्फ़िगर/रूटिंग के साथ करें।yml उपयोगकर्ता, जब तक आप यह इंगित नहीं कर सकते कि यह कहां कहता है –