Show users offers on dedicated page
This commit is contained in:
parent
c2636811fd
commit
1ae9096729
4 changed files with 49 additions and 38 deletions
|
@ -47,7 +47,7 @@ class UserController extends AbstractController
|
|||
{
|
||||
$user = $this->getUser();
|
||||
|
||||
return $this->render('user/offers.html.twig', [
|
||||
return $this->render('user/public.html.twig', [
|
||||
'user' => $user,
|
||||
'offers' => $offeringRepository->findByUser($user),
|
||||
]);
|
||||
|
@ -105,4 +105,15 @@ class UserController extends AbstractController
|
|||
|
||||
throw new HttpException(403, "No permission");
|
||||
}
|
||||
|
||||
#[Route('/myoffers', name: 'own_offers')]
|
||||
public function ownOffers(OfferingRepository $offeringRepository): Response
|
||||
{
|
||||
$user = $this->getUser();
|
||||
|
||||
return $this->render('user/offers.html.twig', [
|
||||
'user' => $user,
|
||||
'offers' => $offeringRepository->findByUser($user),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue