Feat: Add contacts
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user