新增内容时间格式化

This commit is contained in:
augushong
2020-08-13 00:37:38 +08:00
parent 2959b09e09
commit c83f37760a
2 changed files with 7 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ class Post extends Model
$value = $this->getData('publish_time');
return date('Y-m-d',$value);
}
public function getPublishTimeDatetimeAttr()
{
$value = $this->getData('publish_time');
return date('Y-m-d H:i:s',$value);
}
public function getCategorysListAttr()
{