FOSRestBundle: How to Avoid Automatic Pluralization of POST /login Route?
问题 I have this Action to handle the user login also via REST api call: /** * Login Action * * @param Request $request */ public function postLoginAction(Request $request) { This is what php app/console router:debug shows me: en__RG__post_login POST ANY ANY /api/1/logins.{_format} In this case the automatic pluralization to " logins " is not so nice... any ideas how to get only " login "? 回答1: You can manage default route pluralization by overriding fos_rest.inflector.doctrine service. refer this