This commit is contained in:
2025-06-27 17:15:47 +08:00
parent c8eb5f33ee
commit 541ed9a3ec
3 changed files with 8 additions and 3 deletions
+5
View File
@@ -53,4 +53,9 @@ class CommentModel extends Model
* 不允许自动填充模型字段
*/
protected $guarded = [];
protected function serializeDate(\DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s'); // 统一格式化为字符串
}
}