public function actionCreateVirtual() { $model = new Subsgroup(); if ($model->load(Yii::$app->request->post()) && $model->save()) { GlobalFunctionController::activity_user("[CREATE SUBSGROUP] Name : {$model->name} ,Description : {$model->desc}, Virtual : {$model->virtual_id}, Area Code : {$model->area_code},Office Code : {$model->office_code}, Rating : {$model->rating_id}, Wallet : {$model->wallet}"); Yii::$app->Controllers->historyUserWithData($model); echo 1; } else { return $this->renderAjax('create_virtual', ['model' => $model]); } }