refactor: hidden内容修改
This commit is contained in:
@@ -70,7 +70,7 @@ class BannerItem
|
||||
{
|
||||
$id = request()->param('id');
|
||||
|
||||
$banner_item = SysBannerItemModel::with('prod_mapping.category')
|
||||
$banner_item = SysBannerItemModel::with('prodMapping.category')
|
||||
->withoutField([
|
||||
'created_at',
|
||||
'updated_at',
|
||||
|
||||
@@ -20,7 +20,7 @@ class SysBannerItemModel extends SysBannerItemBaseModel
|
||||
// 绑定产品分类关联模型中字段到父模型
|
||||
protected $append = ['rel_prod_cate_id', 'rel_prod_cate_name'];
|
||||
// 要隐藏的字段或关联模型数据字段
|
||||
protected $hidden = ['prod_mapping'];
|
||||
protected $hidden = ['prodMapping'];
|
||||
|
||||
// 关联分类
|
||||
public function banner()
|
||||
|
||||
Reference in New Issue
Block a user