Controller , I can't found how using POST method without form in this part
public function validerReservationAction(Request $request,$id) {
$em = $this->getDoctrine()->getEntityManager();
$reserv = $em->getRepository('LacarteRestBundle:Reservation')->findOneBy(array('id' => $id));
if ($this->getRequest()->getMethod() == "POST") {
// $reserv = $_POST['OkResto'];
$reserv->setOkResto(1);
$em->persist($reserv);
$em->flush();
}
return $this->FindAllRsvAction();
}
routing yml
lacarte_rest_validerRsv:
path: /tableRsv/{id}
defaults: { _controller: LacarteRestBundle:Rsv:validerReservation }
This is the view
<a href="{{ path('lacarte_rest_validerRsv', { 'id': reservation.id })}}" title="Valider"><i class="splashy-check"></i></a>