title: How do I add a parameter ton my path symfon4?
body: <p>Hello im trying to give an id parameter to my path however when i click on the button to go to my url with the id there is an error and the url shows /x istead of an Id.</p>
  
  <p>I already tried this </p>
  
  <pre><code>&lt;a href="{{ path('confirm_selected_cours', {'id': cour.id }) }}" class="btn btn-primary float-right" role="button"&gt;S'inscrire dans ce cours&lt;/a&gt;
  </code></pre>
  
  <p>but it did not work</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;ul class="list-group"&gt;
   {% for cour in cours %}
       &lt;li class="list-group-item list-group-item-warning"&gt;
           {{ cour.title }}
           &lt;a href="{{ path('confirm_selected_cours', {'id': cour.id }) }}" class="btn btn-primary float-right" role="button"&gt;S'inscrire dans ce cours&lt;/a&gt;
      &lt;/li&gt;
   {% endfor %}
  </code></pre>
  
  <p></p>
  
  <p>and this is in my Controller 
     `/**
       * @Route("/etudiant/inscription-cours/{id}", name="confirm_selected_cours")
       */</p>
  
  <pre><code>public function confirmRegistrationCours($id)
  {
       $repoCours = $this-&gt;getDoctrine()-&gt;getRepository(Cours::class);
       $cours = $repoCours-&gt;find($id);
       return $this-&gt;render('student/show_selected_cours.html.twig', [
           'cour' =&gt; $cours
       ]);
  </code></pre>
  
  <p>}`</p>