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(); }
public function actionDelog() { echo Adminlogin::deleteAll() >= 1 ? 1 : 0; }