Bonjour,
Je developpe un site et j'ai un soucis avec un controlleur.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| public function websiteAction(Request $request)
{
$user = $this->get('security.token_storage')->getToken()->getUser();
$vote = $user->getVote();
$form = $this->get('form.factory')->create(VoteType::class, $vote);
$top = $user->getVote()->getId();
$antispam = $this->services['mt2_vote.antispam'] = new \MT2\VoteBundle\Antispam\MT2Antispam($this->get('doctrine.orm.entity_manager'));
$dayLeft = $antispam->getDayPremium($user->getVote()->getPremium());
if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {
$vote->getImages()->upload();
$em = $this->getDoctrine()->getManager();
$em->persist($vote);
$em->flush();
return $this->redirectToRoute('mt2_vote_homepage');
}
return $this->render('MT2VoteBundle:Account:website.html.twig',array('form' => $form->createView(), 'idpremium' => $top, 'day' => $dayLeft));
} |
Voila mon erreur

j'aii activer la serialization (je sais pas si ça a un rapport)
serializer: { enable_annotations: true }
Je ne trouve pas mon erreur depuis cette aprem.
Pouvez vous m'aider ?
Merci d'avance
Partager