Hi,
I'm trying to get the current router name in my view I defined before like this:
$router->add(
'/session/start', array(
'module' => 'frontend',
'namespace' => 'Frontend\Controllers',
'controller' => 'session',
'action' => 'start'
)
)->setName('session-start');
So, I need "session-start" when I am at "/session/start". I found this but it doesn't work:
\Phalcon\DI::getDefault()->get('router')->getMatchedRoute()->getName();