Phalcon\Tag isn't working as expected

Hi! I have a problem with generating links using Phalcon\Tag. I have configured routing component using DI so that I have named route.

<?php
...
    $di->set('router', function () {
        $router = new \Phalcon\Mvc\Router();

        //Define a route
        $router->add('/signup', ['controller' => 'auth', 'action' => 'signup'])->setName('registration');

        return $router;
    });

But when I try to create link for a named route as in the tutorial

<?= Tag::linkTo(['for' => 'registration'], 'Registration') ?>

I get this:

<a for="registration" href="http://localhost/"></a>

Is that a bug? Or I'm doing something wrong?



85.4k

hi, the link must be:

<?= Tag::linkTo([['for' => 'registration'], 'Registration']) ?>


208

Thanks for reply! It is all working correctly now!