我当前使用的是symfony4,我遇到了这个错误

我的路线
property.show:
path: /biens/{slug}-{id}
controller: App\Controller\PropertyController::show
requirements:
id: "\d+"
slug: "[a-z0-9\-]*"
发布于 2019-01-06 12:52:31
正则表达式转义不正确,试试这个:
property.show:
controller: "App\\Controller\\PropertyController::show"
path: "/biens/{slug}-{id}"
requirements:
id: \d+
slug: "[a-z0-9\\-]*"https://stackoverflow.com/questions/53658721
复制相似问题