Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs
/
src
/
Controller
/
Front
/
//srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs/src/Controller/Front/UserController.php
<?php namespace App\Controller\Front; use App\Entity\User; use App\Repository\BookingRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; /** * @Route("/profile") */ class UserController extends AbstractController { protected $em; protected $bookingRepository; public function __construct(EntityManagerInterface $em, BookingRepository $bookingRepository) { $this->em = $em; $this->bookingRepository = $bookingRepository; } /** * @Route("/", name="app_profile") */ public function index(): Response { /**@var User */ $user = $this->getUser(); $bookings = $this->bookingRepository->findBy(['user' => $user]); return $this->render("Front/User/profile.html.twig", [ "bookings" => $bookings ]); } }