修改商品

This commit is contained in:
邹景立 2022-04-15 21:51:59 +08:00
parent fa46967111
commit 511df78a13
2 changed files with 19 additions and 1 deletions

View File

@ -11,5 +11,13 @@ use think\admin\Model;
*/ */
class ShopGoods extends Model class ShopGoods extends Model
{ {
/**
* 格式化创建时间
* @param string $value
* @return string
*/
public function getCreateAtAttr(string $value): string
{
return format_datetime($value);
}
} }

View File

@ -75,4 +75,14 @@ class ShopGoodsCate extends Model
foreach ($cates as &$cate) unset($cate['parent']); foreach ($cates as &$cate) unset($cate['parent']);
return array_values($cates); return array_values($cates);
} }
/**
* 格式化创建时间
* @param string $value
* @return string
*/
public function getCreateAtAttr(string $value): string
{
return format_datetime($value);
}
} }