S
S
Stepan Davashenevquestion2016-04-03 04:30:33
Slim Framework
Stepan Davashenevquestion, 2016-04-03 04:30:33

How to pass a value with a dot to routing in slimframework?

you need to pass the API version, but slim says 404 in response, apparently the problem is in the dots in the address

I have
slim 2.6*

/api/v1.0.2
I do an example query like this
$app->get('/api/:ver', function ($ver) use ($app,$DB) {
  echo $ver;
})->conditions(array('ver' => '^v[0-9].[0-9].[0-9]'));

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question