src/Controller/AboutUsController.php line 13

  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\AboutUsRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class AboutUsController extends AbstractController
  8. {
  9.     #[Route('/about/us'name'app_about_us')]
  10.     public function index(AboutUsRepository $aboutUsRepository): Response
  11.     {
  12.         $text $aboutUsRepository->findOneBy(['reference_page' => 'about us']);
  13.         return $this->render('about_us/index.html.twig', [
  14.             'title' => 'Qui sommes nous ?',
  15.             'text' => $text
  16.         ]);
  17.     }
  18. }