title: Passing Parameter To Controller - yii2-app-basic Yii2
body: <blockquote>
    <p><a href="http://localhost/yii2-app-basic/web/site/confirm/39/" rel="nofollow noreferrer">http://localhost/yii2-app-basic/web/site/confirm/39/</a></p>
  </blockquote>
  
  <p>I'm manually passing 39 in upper URL to know how to work with parameters.</p>
  
  <p>I want to display 39 in <code>confirm.php</code> but it's not working. As soon, i'm passing <code>$id</code> in <code>actionConfirm($id)</code> of <code>SiteController</code> Controller.
  Page Not Found Error Coming. What can be the problem.</p>
  
  <p>I just asked one question <a href="https://stackoverflow.com/questions/32947396/url-routing-yii-basic-app-yii2">URL Routing</a>, where i got my answer. But, now here i got stuck. </p>
  
  <p><strong>confirm.php</strong></p>
  
  <pre><code>&lt;?php
  
      /* @var $this yii\web\View */
  
      use yii\helpers\Html;
      use yii\bootstrap\ActiveForm;
      use yii\captcha\Captcha;
      use yii\bootstrap\Modal;
      use yii\helpers\Url;
  
      $this-&gt;title = 'Contact';
      $this-&gt;params['breadcrumbs'][] = $this-&gt;title;
  ?&gt;
  &lt;div class="site-about"&gt;
      &lt;?echo $id;?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>SiteController.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace app\controllers;
  
  use Yii;
  use yii\filters\AccessControl;
  use yii\web\Controller;
  use yii\filters\VerbFilter;
  use yii\swiftmailer\Mailer;
  
  use app\models\LoginForm;
  use app\models\ContactForm;
  use app\models\EntryForm;
  use app\models\RegisterForm;
  use app\models\LoginExecForm;
  use app\models\ForgotPasswordForm;
  
  class SiteController extends Controller
  {
      .
      .
      .
      public function actionConfirm($id)
      {
  
          $id = Yii::$app-&gt;request-&gt;get('id');
          return $this-&gt;render("confirm",array("id"=&gt;$id));
      }
  }
  </code></pre>
  
  <p>Error Coming</p>
  
  <p><a href="https://i.stack.imgur.com/litCN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/litCN.png" alt="enter image description here"></a></p>
  
  <p>How to bring 39 from URL to <code>confirm.php</code> page. Please help me. Forgive me, If this is a silly question.</p>