title: How to pass argument to controller with Symfony?
body: <p>I am passing  var argurmrnt to controller like this</p>
  
  <pre><code>return $this-&gt;redirect($this-&gt;generateUrl('user_profile', array('var' =&gt; $profile-&gt;getId())));
  </code></pre>
  
  <p>THis is my controller</p>
  
  <pre><code>/**
  
  
           * @Route("/profile", name="user_profile")
           * @Template()
           */
          public function ProfileAction($var)
          {
              $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
  </code></pre>
  
  <p>But i keep getting error</p>
  
  <blockquote>
    <p>Controller "xxxx\Controller\UserController::ProfileAction()" requires
    that you provide a value for the "$var" argument (because there is no
    default value or because there is a non optional argument after this
    one).</p>
  </blockquote>