Answer the question
In order to leave comments, you need to log in
Yii2. How to send a variable through pjax and display it?
Hello. I'm trying to send a variable via pjax and get it processed. But it doesn't work.
this is view
<?php Pjax::begin(['enablePushState' => false]); ?>
<?php
$index = 0;
echo $index;
?>
<?= Html::a('Добавить адрес', ['user/dublicate-address', 'index' => $index], [
'class' => 'btn btn-success',
]) ?>
<?php Pjax::end(); ?>
public function actionDublicateAddress($index){
$index++;
return $this->render('test',[
'index' => $index
]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question