<?php
namespace App\Controller;
//use Twig\Enviroment;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\Applicant;
use App\Form\ApplicantFormType;
class MainController extends AbstractController
{
/**
* @Route("/", name="app_index")
*/
public function index() : Response
{
return $this->render('index.html.twig');
}
/**
* @Route("/apply")
* */
// public function apply(Environment $twig)
/* public function apply (Request $request): Response
{
$applicant = new Applicant();
$form = $this->createForm(ApplicantFormType::class, $applicant);
/* return new Response($twig->render('applicant/show.html.twig', [
'applicant_form' => $form->createView()
]));
return $this->renderForm('applicant/show.html.twig', [
'form' => $form,
]);
}*/
/* public function number(): Response
{
$number = random_int(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}*/
}