Generating urls

Hi

I am trying to generate a url into volt template file as explained here: http://docs.phalconphp.com/en/latest/reference/url.html#generating-uris

// MY ROUTE
$router->add('/my-custom-url', array(
    'controller' => 'MyController',
    'action' => 'myaction'
))->setName('unique-route-name');

How to generate this url on volt?

I try with:

{{ url('unique-route-name') }}

But this produce url /unique-route-name/ and not /my-custom-url/

Thanks!!



84.5k

You can use:

{{ url.get('unique-route-name') }}


5.5k

( Shouldn't that be:

{{ url.get(['for': 'unique-route-name']) }}

? )