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.

Strange behaviour of router

Hi,

I'm trying to use router from Phalcon\Mvc\Micro object like that:

http://pastebin.com/w7v7LhZq

but for valid request I'm getting following exception:

Uncaught exception 'Phalcon\Mvc\Micro\Exception' with message 'Matched route doesn't have an associate handler'

What am I doing wrong? Can anybody help me with this one?

Thanks in advance,

Kamil



83.2k
Accepted
answer

The router is internally reset by Phalcon\Mvc\Micro, if you want to use controllers, you can use 'collections': http://docs.phalconphp.com/en/latest/reference/micro.html#using-controllers-as-handlers

Works like a charm. Thanks