public function actionCreateProfil() { if ($this->isInsertAllowed()) { $this->layout = 'home'; if (Yii::$app->request->post()) { $ProfilModel = new hrdPegawai(); $ProfilModel->saveProfil(Yii::$app->request->post()); $AbsensiModel = new hrdAbsensi(); $UserType = new UserType(); $AbsensiModel->saveAbsensiUser($UserType->getPegawaiId()); $UserModel = new User(); $UserModel->saveUser($UserType->getPegawai(), Yii::$app->request->post()); return $this->redirect('profil'); } return $this->render('insert_profil'); } else { echo "You don't have access here"; die; } }