/**
  * Creates a new IdcardLog model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new IdcardLog();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
Example #2
0
 /**
  * 身份验证错误日志记录
  * @param $uid
  * @param $name
  * @param $idcard
  * @param $status
  * @param $remark
  */
 private static function idcardLog($uid, $name, $idcard, $status, $remark)
 {
     $cardLog = new IdcardLog();
     $cardLog->uid = $uid;
     $cardLog->name = $name;
     $cardLog->idcard = $idcard;
     $cardLog->status = $status;
     $cardLog->remark = $remark;
     $cardLog->save();
 }