Reputation: 23
am currently on symfony4 and I have this error
my routes
property.show:
path: /biens/{slug}-{id}
controller: App\Controller\PropertyController::show
requirements:
id: "\d+"
slug: "[a-z0-9\-]*"
Upvotes: 0
Views: 68
Reputation: 577
The regex escaping isn't right, try this:
property.show:
controller: "App\\Controller\\PropertyController::show"
path: "/biens/{slug}-{id}"
requirements:
id: \d+
slug: "[a-z0-9\\-]*"
Upvotes: 2