src/Controller/FaqController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Faq;
  4. use App\Entity\FaqCategories;
  5. use App\Entity\MetaData;
  6. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class FaqController extends AbstractController {
  9.     /**
  10.      * @Route("/faq", name="faq_page")
  11.      */
  12.     public function faqAction()
  13.     {
  14.         $repo_faq $this->getDoctrine()->getRepository(Faq::class)->getFindFaq();
  15.         $repo_faq_cat $this->getDoctrine()->getRepository(FaqCategories::class)->findAll();
  16.         $repo_meta $this->getDoctrine()->getRepository(MetaData::class)
  17.             ->findOneBy(['id' => 2]);
  18.         return $this->render('frontend/faq.html.twig',
  19.         [
  20.             'faq_data' => $repo_faq,
  21.             'faq_cat' => $repo_faq_cat,
  22.             'meta' => $repo_meta
  23.         ]);
  24.     }
  25. }