title: Yii2: Ajax Call multiple parameters
body: <p>I am using this code for auto-fill with ajax call without any problem:</p>
  
  <p>Code in my view file:</p>
  
  <pre><code>$this-&gt;registerJs("$('#dailywardentry-doctor_visit_name').on('change',function(){
      $.ajax({
          url: '".yii\helpers\Url::toRoute("daily-ward-entry/charges-cash")."',
          dataType: 'json',
          method: 'GET',       
          data: {id:$('#dailywardentry-doctor_visit_name').val(),
         room_category:$('#dailywardentry-room_name').val()// Want to use this additional params 
  
          },
          success: function (data, textStatus, jqXHR) {
              $('#dailywardentry-visit_charges').val(data.visit_charges);
              $('#dailywardentry-doctor_id').val(data.doctor_id);
              },
      });
  });");
  </code></pre>
  
  <p>And code in my controller is like:</p>
  
  <pre><code>public function actionChargesCash($id){
  
          $model = \app\models\IpdCharges::findOne(['id'=&gt;$id]);
          return \yii\helpers\Json::encode([
              'visit_charges'=&gt;$model-&gt;charges_cash,
              'doctor_id'=&gt;$model-&gt;doctor_id
  
          ]); 
      }
  </code></pre>
  
  <p>I want to fill the data on the basis of additional parameter <code>room_category:$('#dailywardentry-room_name').val()</code> which is not working.</p>
  
  <p>While checking in firefox I am getting the status 200 OK like:</p>
  
  <pre><code>**GET http://localhost/hospitalerp/web/index.php?r=daily-ward-entry%2Fcharges-cash&amp;id=1&amp;room_category=6**
  </code></pre>
  
  <p>Still I am getting the values as if the parameter room_category is not supplied.</p>
  
  <p>Any solution will be greatly appreciated. Thanks.</p>