增加商品详情的案例查询;删除部分技术债务

This commit is contained in:
2022-08-16 16:32:40 +08:00
parent 3661ff357f
commit 31f2be73d4
4 changed files with 144 additions and 7 deletions

View File

@@ -15,4 +15,12 @@ class MallGoods extends TimeModel
return $this->belongsTo('app\admin\model\MallCate', 'cate_id', 'id');
}
}
public function getTagListTitleAttr()
{
$tags = $this->getAttr('tag');
$list_tag = MallTag::whereIn('id', $tags)->column('title');
return $list_tag;
}
}