我在 routing.yml 文件中定义了路由
一条路线是:
Profile_user_profile:
path: /profile/{id}
defaults: { _controller: ProfileBundle:Users:profile }
methods: [get]
第二个是:
Profile_accept_connection_proposal:
path: /profile/acceptProposal
defaults: { _controller:ProfileBundle:Users:acceptConnectionProposal }
methods: [put]
第一个没有方法的路由:[get] 也监听和 [put] 请求并在它到达路由定义之前捕获第二个 url。有没有办法只在 url 是数字的情况下定义检查参数。