public function payerLoyerAction($idAppartement, $idLocation) { $res = Location::payerLoyer($idLocation); if ($res) { $this->addFlash('Success', 'Votre loyer a bien été payé'); } return $this->redirect($this->generateUrl('gestimo_appartement_info', array('id' => $idAppartement))); }