I have a method in the controller used to change data in a table.
public function bajaServicioAction($idservicio, $idcliente)
{
codigo para hacer el cambio en la base de datos
}
On the other hand I have a template ficha.html.twig
where I want to put a link to execute the aforementioned function
<a href="{{ path('clientes_baja_servicio', {'idservicio': servicio.grupo,
'idcliente': cliente.codigo}) }}"><i class="glyphicon glyphicon-remove-circle"></i></a>
Obviously it does not work because I do not know how to do it correctly, to pass that data to the controller function.
In summary, I need to pass some data from the twig to the function bajaServicioAction
but I do not know how to
We can say that the route is configured to relate these two things, but I do not know how to pass the data from one to the other.
I edit to mention another important detail.
I do not want to go to that route, if not to execute the action that is located in it, that is to say that recharge the current page with the data.