participant view
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Repository\ParticipantRepository;
|
||||
use App\Repository\SiteRepository;
|
||||
use App\Repository\SortieRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
@@ -40,11 +41,20 @@ class MainController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[Route('/inscription', name: 'inscription')]
|
||||
public function inscription(TokenStorageInterface $tokenStorage): Response
|
||||
{
|
||||
return $this->render('main/inscription.html.twig');
|
||||
}
|
||||
|
||||
#[Route('/participants', name: 'participants')]
|
||||
public function participants(TokenStorageInterface $tokenStorage, ParticipantRepository $participantRepository): Response
|
||||
{
|
||||
$token = $tokenStorage->getToken();
|
||||
$userConnect = $token?->getUser();
|
||||
return $this->render('main/participants.html.twig', [
|
||||
'profile' => $userConnect,
|
||||
'participants' => $participantRepository->findAll(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user