Example #1
0
 private function log($user, $res)
 {
     $Adminlogin = new Adminlogin();
     // 定义数据
     $Adminlogin->username = $user;
     $Adminlogin->time = time();
     $Adminlogin->ip = Yii::$app->request->userIp;
     $Adminlogin->statu = $res['statu'];
     $Adminlogin->des = $res['des'];
     // 执行插入
     $Adminlogin->save();
 }
Example #2
0
 public function actionDelog()
 {
     echo Adminlogin::deleteAll() >= 1 ? 1 : 0;
 }