From 7b9542f0bd34856a817b3d8c0a02870e83c53e62 Mon Sep 17 00:00:00 2001 From: thisfro Date: Wed, 26 Jan 2022 10:10:19 +0100 Subject: [PATCH] Redirect to offer after editing --- src/Controller/OfferController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Controller/OfferController.php b/src/Controller/OfferController.php index 5edc4af..21e1b82 100644 --- a/src/Controller/OfferController.php +++ b/src/Controller/OfferController.php @@ -170,6 +170,10 @@ class OfferController extends AbstractController $this->entityManager->persist($offer); $this->entityManager->flush(); + + $this->addFlash("success", "Successfully updated the offer!"); + + return $this->redirectToRoute('show_offer', ['urlId' => $offer->getUrlId()]); } return $this->render('offer/edit.html.twig', [