I used runAction()
function to launch action within another action in the same controller.
Yii::$app->runAction('main/goods', ['model_id' => $goods->id]);
. How to get this variable in actionGoods()
?
Try this way
Yii::$app->runAction('main/goods', ['model_id' => $goods->id]);
In MainController
public function actionGoods($model_id)
{
..... yuor code
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With