I've been trying to add a form on my blog app. I had one controller for the moment and everything were just fine (display my home page, display all articles, display one specific article with it's comments, and create an article). I created a new SecurityController to manage the users registration/login etc.But I can't display the simplest view. Here's what I have :
class SecurityController extends AbstractController /** * @Route("/inscription", name="security_registration") */ public function registration() { $user = new User(); $form = $this->createForm(RegistrationType::class, $user); return $this->render('security/registration.html.twig', ['form' => $form->createView() ]); }
registration.html.twig :
{% extends 'base.html.twig' %} {% block body %}<h1>Hello world</h1> {% endblock %}
I got the error : No route found for "GET /inscription"Why is that ? Thanks :D