mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
自动时间字段(create_time 和 update_time)的获取自动使用时间格式化
This commit is contained in:
@@ -437,6 +437,8 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
} elseif (isset($this->type[$name])) {
|
||||
// 类型转换
|
||||
$value = $this->readTransform($value, $this->type[$name]);
|
||||
} elseif (in_array($name, [$this->createTime, $this->updateTime])) {
|
||||
$value = $this->formatDateTime($value, $this->dateFormat);
|
||||
} elseif ($notFound) {
|
||||
$method = Loader::parseName($name, 1, false);
|
||||
if (method_exists($this, $method) && $this->$method() instanceof Relation) {
|
||||
|
||||
Reference in New Issue
Block a user