Feat: Add contacts

This commit is contained in:
Björn Fromme
2023-10-16 12:05:18 +02:00
parent f5fee787a0
commit 3fd4c6ca54
19 changed files with 658 additions and 2 deletions
+18 -1
View File
@@ -2,15 +2,32 @@
namespace App\Controller\Teamer;
use App\Repository\ContactRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class ContactController extends AbstractController
{
public function __construct(private readonly ContactRepository $contactRepository)
{}
#[Route('/teamer/contact', name: 'app_teamer_contact')]
public function index(): Response
{
return $this->render('teamer/contact/index.html.twig');
$generalContacts = $this
->contactRepository
->getGeneralContacts()
;
$destinationContacts = $this
->contactRepository
->getDestinationContacts()
;
return $this->render('teamer/contact/index.html.twig', [
'generalContacts' => $generalContacts,
'destinationContacts' => $destinationContacts,
]);
}
}