/** * Creates a new Code model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionImport() { $model = new InvitationCodeSearch(); if (\App::$app->request->post()) { $num = \App::$app->request->post()['Code']['num']; member::set_invitation($num); return $this->redirect(['index']); } else { return $this->render('import', ['model' => $model]); } }