Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Recibo la petición de un formulario
/**
* @Route("/{id}/formulario-individual", name="formularioIndividual")
*/
public function formularioIndividualAction(Equipo $equipo, Request $request)
{
$form = $this->createForm(new EquipoType(), $equipo);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($equipo);
$em->flush();
return $this->redirectToRoute('homepage');
}
return $this->redirectToRoute('formulariosEquipos');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment