src/Controller/HomeController.php line 99
<?phpnamespace App\Controller;use App\Form\ContactType;use App\Repository\CompanyRepository;use App\Repository\ExperienceRepository;use App\Repository\FormationRepository;use App\Repository\InterestRepository;use App\Repository\MeRepository;use App\Repository\ProjectRepository;use App\Repository\SkillsRepository;use App\Service\ContactHandle;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;class HomeController extends AbstractController{// #[Route('/me', name: 'app_me_v0')]// public function mepagev0(MeRepository $meRepository, InterestRepository $interestRepository,// SkillsRepository $skillsRepository, ExperienceRepository $experienceRepository,// FormationRepository $formationRepository, ProjectRepository $projectRepository):// Response// {// return $this->render('home/me.html.twig', [// 'me' => $meRepository->findOneBy(['id'=>1]),// 'interests' => $interestRepository->findAll(),// 'softs' => $skillsRepository->findBy(['type' => 'soft']),// 'technos' => $skillsRepository->findBy(['type' => 'language']),// 'softwares' => $skillsRepository->findBy(['type' => 'software']),// 'experiences' => $experienceRepository->findAll(),// 'formations' => $formationRepository->findAll(),// 'projects' => $projectRepository->sortedStartedAt(),// ]);// }#[Route('/contact', name: 'app_contact')]public function contact(Request $request, CompanyRepository $companyRepository, ContactHandle $contactHandle):Response{$form = $this->createForm(ContactType::class);$form->handleRequest($request);if ($form->isSubmitted() && $form->isValid()){$contactHandle->discordMessage($form);$this->addFlash('success', 'message envoyé avec succès !');return $this->redirectToRoute('app_contact');}return $this->render('home/contact.html.twig',['company' => $companyRepository->findOneBy(['id' =>1]),'form' => $form,'page' => 'contact']);}#[Route('/github', name: 'github')]public function github(CompanyRepository $companyRepository):Response{return $this->redirect($_ENV['URL_GITHUB']);}#[Route('/linkedin', name: 'linkedin')]public function linkedin(CompanyRepository $companyRepository):Response{return $this->redirect($_ENV['URL_LINKEDIN']);}#[Route('/instagram', name: 'instagram')]public function instagram(CompanyRepository $companyRepository):Response{return $this->redirect($_ENV['URL_INSTAGRAM']);}#[Route('/discord', name: 'discord')]public function discord(CompanyRepository $companyRepository):Response{return $this->redirect($_ENV['URL_DISCORD']);}#[Route('/twitch', name: 'twitch')]public function twitch(CompanyRepository $companyRepository):Response{return $this->redirect($_ENV['URL_TWITCH']);}#[Route('/{reactRouting}', name: 'app', requirements: ['reactRouting' => '.+'], defaults: ['reactRouting' => null])]public function index(CompanyRepository $companyRepository):Response{return $this->render('react/reactMicro.html.twig',[]);}}