This commit is contained in:
tokumeikoi
2021-08-21 16:20:16 +09:00
parent 303d4a1c66
commit b0c818c661
2 changed files with 8 additions and 5 deletions

View File

@ -87,10 +87,13 @@ class UserService
if (!$user) {
return true;
}
$user->t = time();
$user->u = $user->u + $u;
$user->d = $user->d + $d;
if (!$user->save()) {
try {
$user->update([
't' => time(),
'u' => DB::raw("u + {$u}"),
'd' => DB::raw("d + {$d}")
]);
} catch (\Exception $e) {
return false;
}
$mailService = new MailService();