private function loginLog($type, $uname) { $data = array('type' => $type, 'uname' => $uname, 'ip' => $this->request->getClientAddress(), 'time' => date('Y-m-d H:i:s'), 'agent' => $this->request->getUserAgent()); $DB = new LogAdminLogin(); $DB->save($data); }