this is the route that makes problems:
Route::set('api', 'api(/<action>(/<currency_data>(/<currency_value>)))',
array(
'currency_data' => '(\d\-\d)|(\w\-\w)',
'currency_value' => '\d+(\.\d{1,2})?'
))
->defaults(array(
'controller' => 'api',
'action' => 'get',
));
the url would be something like:
/api/currency/123-321/123.00
or
/api/currency/abc-cba/123
both scenarios are covered but at the end do not work, why?
the default rout is at the end of bootstrap(i know someone will suggest that)
tnx
\d and \w only match one character. Therefore 123-321 does not match \d-\d and abc-cba does not match \w-\w.
If this is not the problem then please give more information on how it “does not work”. What does work? What is the result you get, etc.