create a public user page
This commit is contained in:
parent
e0ec9807a3
commit
428baa749c
6 changed files with 92 additions and 43 deletions
|
@ -52,12 +52,13 @@ class UserController extends AbstractController
|
|||
]);
|
||||
}
|
||||
|
||||
#[Route('/user/{id}', name: 'public_wishlist')]
|
||||
public function show_user(User $user, WishRepository $wishRepository): Response
|
||||
#[Route('/user/{id}', name: 'user_public')]
|
||||
public function show_user(User $user, OfferingRepository $offeringRepository, WishRepository $wishRepository): Response
|
||||
{
|
||||
return $this->render('user/public_wishlist.html.twig', [
|
||||
return $this->render('user/public.html.twig', [
|
||||
'username' => $user->getUsername(),
|
||||
'wishes' => $wishRepository->findByUser($user),
|
||||
'offers' => $offeringRepository->findByUser($user),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue