diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 6dd0e67..9597a07 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -36,6 +36,17 @@ class UserController extends AbstractController ]); } + #[Route('/user/offers', name: 'user_offers')] + public function userOffers(OfferingRepository $offeringRepository): Response + { + $user = $this->getUser(); + + return $this->render('user/offers.html.twig', [ + 'user' => $user, + 'offers' => $offeringRepository->findByUser($user), + ]); + } + #[Route('/user/{id}', name: 'public_wishlist')] public function show_user(User $user, WishRepository $wishRepository): Response { diff --git a/templates/user/offers.html.twig b/templates/user/offers.html.twig new file mode 100644 index 0000000..c621baf --- /dev/null +++ b/templates/user/offers.html.twig @@ -0,0 +1,34 @@ +{% extends 'base.html.twig' %} + +{% block title %}My offers{% endblock %} + +{% block body %} + {% for message in app.flashes('success') %} +
{{ offer.description }}
+