|
@@ -22,7 +22,7 @@ class UserCoupon extends Model
|
|
|
return $this->hasMany(UserCouponGoods::class,'coupon_id');
|
|
|
}
|
|
|
public function goods(){
|
|
|
- return $this->belongsToMany(Goods::class,'goods_id','coupon_id');
|
|
|
+ return $this->belongsToMany(Goods::class,UserCouponGoods::class,'goods_id','coupon_id');
|
|
|
}
|
|
|
|
|
|
protected static function init()
|