admin add UserModifyLog

This commit is contained in:
xiaomlove
2025-05-07 20:01:29 +07:00
parent eb830ec869
commit 5164ee16a6
8 changed files with 118 additions and 4 deletions

View File

@@ -9,4 +9,14 @@ class SiteLog extends NexusModel
protected $fillable = ['added', 'txt', 'security_level', 'uid'];
public static function add($uid, $content, $isMod = false): void
{
self::query()->insert([
'uid' => $uid,
'txt' => $content,
'security_level' => $isMod ? 'mod' : 'normal',
'added' => now(),
]);
}
}