We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

how to send multiple parameters from volt to controller

<td width="7%">
    {{ link_to("employee/edit/" ~ loop.index, '<i class="glyphicon glyphicon-edit"></i> Edit', "class": "btn btn-default") }}
</td>
<td width="7%">{{ link_to("employee/unsubscribe/" ~loop.index, '<i class="glyphicon glyphicon-remove"></i> Unsubscribe', "class": "btn btn-default") }}</td>

i want to send multiple parameters to "employee/edit/" ie along with loop.index.... how to do?? please help!!



93.7k
Accepted
answer

Can't you just separate them with / and access them with dispatcher->getParams()?

{{ link_to("employee/unsubscribe/" ~loop.index ~"/" ~ var2 ~"/" ~ var3, 'Unsubscribe', "class": "btn btn-default") }}