Flash a notification when offering added
This commit is contained in:
parent
990da0e669
commit
48174c8998
2 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,9 @@ class AppController extends AbstractController
|
|||
|
||||
$this->entityManager->persist($offering);
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->addFlash("success", "Successfully added the new offering!");
|
||||
return $this->redirectToRoute('homepage');
|
||||
}
|
||||
|
||||
return $this->render('app/new_listing.html.twig', [
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
{% block body %}
|
||||
|
||||
{% for message in app.flashes('success') %}
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<h1>Offerings</h1>
|
||||
{% if offerings|length > 0 %}
|
||||
<div class="card-deck d-flex justify-content-around">
|
||||
|
|
Reference in a new issue