<?php
namespace App\Controller;
use App\Entity\Faq;
use App\Entity\FaqCategories;
use App\Entity\MetaData;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class FaqController extends AbstractController {
/**
* @Route("/faq", name="faq_page")
*/
public function faqAction()
{
$repo_faq = $this->getDoctrine()->getRepository(Faq::class)->getFindFaq();
$repo_faq_cat = $this->getDoctrine()->getRepository(FaqCategories::class)->findAll();
$repo_meta = $this->getDoctrine()->getRepository(MetaData::class)
->findOneBy(['id' => 2]);
return $this->render('frontend/faq.html.twig',
[
'faq_data' => $repo_faq,
'faq_cat' => $repo_faq_cat,
'meta' => $repo_meta
]);
}
}