小编roi*_*ble的帖子

The class 'App\Form\Database_InteractionType' was not found in the chain configured namespaces App\Entity

Hello i can't find the error when i try to delete something out of my database.

It says that my namespace is wrong but i really cant find any issues.

Here is the action im calling

   /**
     * @Route("/delete/{id}", name="delete")
     * @param $id
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
     */
    public function deleteById($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entries = $em->getRepository(Database_InteractionType::class)->find($id);

        $em->remove($entries);
        $em->flush();

        return $this->redirectToRoute('show');
    }
Run Code Online (Sandbox Code Playgroud)

Here is Entitiy and my Form. I have been looking at it for 2 hours straight and i …

php namespaces symfony

1
推荐指数
1
解决办法
211
查看次数

标签 统计

namespaces ×1

php ×1

symfony ×1