28 lines
743 B
PHP
28 lines
743 B
PHP
<?php
|
|
|
|
namespace App\Controller\Teamer;
|
|
|
|
use App\Repository\FaqRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
|
|
class FaqController extends AbstractController
|
|
{
|
|
public function __construct(private readonly FaqRepository $faqRepository)
|
|
{
|
|
}
|
|
|
|
#[Route('/teamer/faq', name: 'app_teamer_faq')]
|
|
#[IsGranted('ROLE_USER')]
|
|
public function index(): Response
|
|
{
|
|
$faqs = $this->faqRepository->findBy([], ['sorting' => 'ASC']);
|
|
|
|
return $this->render('teamer/faq/index.html.twig', [
|
|
'faqs' => $faqs,
|
|
]);
|
|
}
|
|
}
|