Reputation: 5522
I want to create a URL using volt (Phalcon).
I have tried:
{{ url("order/view/", ["id" :order.id]) }}
However that produces a URL like:
http://localhost/gateway-new/order/view/?id=7
Whereas I would like the url to look like:
http://localhost/gateway-new/order/view/id/7
Any idea how to do this correctly?
Upvotes: 2
Views: 3926
Reputation: 51
if you have a route defined like
$router->add('order/view/id/:int', array(
'controller' => 'order',
'action' => 'view',
'id' => 1))->setName('order-view');
you could use
{{ url(['for': 'order-view', 'id': order.id]) }}
Upvotes: 5