改进 保存

This commit is contained in:
iVampireSP.com 2023-02-22 23:58:25 +08:00
parent 28b6a9dd50
commit ece91f3687
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -103,7 +103,10 @@ public function markAsRead(): bool
$this->status = 'user_read';
}
$this->save();
// if status is dirty, save it
if ($this->isDirty('status')) {
$this->save();
}
return true;
}