I am working with Symfony 4 and I am trying to send a form by the POST method to a function inside a Controller, but I get an error saying that the Controller does not exist. If I send it by the GET method, everything goes well, that is, the path is correct.
The Route I define it in the same function of the Controller like this:
/**
* @Route("/mi_controller/my_function/", name="mi_route")
*/
public function mi_funciton(){....
Later in the view I create the form like this:
<form action="{{ path('mi_route') }}" method="post" >
If I change the method to GET, it addresses me well, but with POST it says Controller indefinite. Why does that happen and how can I solve it?