i'm working on making crud with symfony and php the READ and DELETE working fine but when i add the create witch is a very simple code :
#[Route('/addClassroom', name: 'addClassroom')]
public function addClassroom(ManagerRegistry $doctrine,Request $request)
{
$classroom = new Classroom();
$form = $this->createForm(ClassroomFormType::class,$classroom);
$form->handleRequest($request);
if($form->isSubmitted()){
$em =$doctrine->getManager();
$em->persist($classroom);
$em->flush();
return $this->redirectToRoute('afficheC');
}
return $this->renderForm('classroom/addClassroom.html.twig',array('f'=>$form));
}
that erreur shows up : normally it's a thing related with uac(deactivated it so Xampp can run freely) or tls (tried commenting the openssl on both php.ini)currently i'm on 8.1.6 version for both Xampp and php , tried other version but same problem .
btw i did the database work from terminal like so : 1- symfony console doctrine:database:create 2- symfony console make:entity 3- symfony console make:migration 4- symfony console doctrine:migration:migrate 5- symfony console make:form ClassroomForm