WIP: Implement CRUD, improve menu configuration

This commit is contained in:
Björn Fromme
2023-09-27 17:50:42 +02:00
parent c55fd85314
commit c528156959
43 changed files with 2187 additions and 3475 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Controller\Teamer;
use App\Repository\FaqRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\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.html.twig', [
'faqs' => $faqs,
]);
}
}