Show wishes on offer page
This commit is contained in:
parent
4e7b8ec340
commit
eaebcaad57
4 changed files with 59 additions and 1 deletions
|
@ -6,6 +6,8 @@ use App\Entity\Offering;
|
|||
use App\Form\OfferingFormType;
|
||||
|
||||
use App\Repository\OfferingRepository;
|
||||
use App\Repository\WishRepository;
|
||||
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
@ -70,10 +72,11 @@ class OfferController extends AbstractController
|
|||
}
|
||||
|
||||
#[Route('/offer/{id}', name: 'show_offer')]
|
||||
public function show_offer(Offering $offering): Response
|
||||
public function show_offer(Offering $offering, WishRepository $wishRepository): Response
|
||||
{
|
||||
return $this->render('app/offer.html.twig', [
|
||||
'offer' => $offering,
|
||||
'wishes' => $wishRepository->findByUser($offering->getByUser()),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue