Browse Source

首页

master
Lemon 5 years ago
parent
commit
36f48e6e24
  1. 4
      app/Model/v3/Goods.php
  2. 5
      app/Model/v3/GoodsActivity.php

4
app/Model/v3/Goods.php

@ -134,4 +134,8 @@ class Goods extends Model
return $this->morphMany(ShoppingCart::class, 'goods');
}
public function getNameAttribute()
{
return $this->attributes['name'].' '.$this->attributes['goods_unit'];
}
}

5
app/Model/v3/GoodsActivity.php

@ -111,4 +111,9 @@ class GoodsActivity extends Model
return $img_host . $item;
});
}
public function getNameAttribute()
{
return $this->attributes['name'].' '.$this->attributes['goods_unit'];
}
}
Loading…
Cancel
Save