Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

multiple routes pattern problem

Hi I've got problem with multiple route patterns, to handle different routes by one controller action.       

my routing

                            "controller" => "search",
                            "action"     => "index",
                            'params' => 3

                            "controller" => "search",
                            "action"     => "index",
                            'params' => 5

when I run it gives me Action aa was not found on handler search

$this->dispatcher->getParam("from"); not working either

edited Sep '15

Not sure but i tested your code and it didn't work until i moved it at the end of routing list. So i guess it has something to do with what the documentation on routing states: :

Internally, all defined routes are traversed in reverse order until Phalcon\Mvc\Router finds the one that matches the given URI and processes it, while ignoring the rest.

The bold highliting for the "reverse" word is mine of course.


for my second problem $this->dispatcher->getParam("from"); it seems there is a problem on my regexpression, and i dont know why


anyhow i changed it to simple one