Quantcast
Channel: Grafikart | Derniers Sujets du forum
Viewing all articles
Browse latest Browse all 1542

App\Entity\Article object not found by the @ParamConverter annotation.

$
0
0

Bonjour,

Voila je rencontre un petit problème avec mon code.
je cherche a etre redirigé après avoir modifier le commentaire mais j'ai l'erreur App\Entity\Article object not found by the @paramconverter annotation avez vous une petite idée du problème ?

 /**
     * @Route("/{id}/modifier", name="comment_edit", methods={"GET","POST"}, requirements={"id" = "\d+"})
     * @param Request $request
     * @param Article $article
     * @param Comment $comment
     * @param LinkRepository $linkRepository
     * @param MoreRepository $moreRepository
     * @return Response
     */
    public function editComment(Request $request,Article $article, Comment $comment,LinkRepository $linkRepository,MoreRepository $moreRepository): Response
    {
        $form = $this->createForm(CommentType::class, $comment);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $this->getDoctrine()->getManager()->flush();
            return $this->redirectToRoute('article_details',['id' => $article->getId()]);
        }

Viewing all articles
Browse latest Browse all 1542

Trending Articles