I’m trying to set up routing for my CakePHP application.
One example of a URL I want is /:slug-c-:id/. (EG example.com/foo-c-1/)
This URL is supposed to have two passed parameters: :slug and :id.
However, CakePHP sees the two parameters as :slug-c and :id.
I tried separating the route like this :slug\-c-:id, but then when I use the HTML helper to build a URL, it includes the \ in the string it builds. (EG example.com/foo\-c-1/
Is there another way to separate passed parameters from other strings? Something like PHP’s This is a string with a {$var}adjacent to letters
I found a somewhat hacky solution that I’d rather not use, but basically I set up my route as:
/:slug-:cslug-:id/*and set:cslug‘s regular expression tocThe problem with this is every time I set up a URL with HTML helper I have to do