diff --git a/app/Models/Good.php b/app/Models/Good.php index ead9a6c..9f8ff93 100644 --- a/app/Models/Good.php +++ b/app/Models/Good.php @@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; /** - * @property GoodsItem $good_item + * @property GoodsItem $item */ class Good extends Base { diff --git a/app/Models/GoodsItem.php b/app/Models/GoodsItem.php index 467e045..29f91d9 100644 --- a/app/Models/GoodsItem.php +++ b/app/Models/GoodsItem.php @@ -14,7 +14,8 @@ class GoodsItem extends Base 'item_id', 'brand', 'color_name', 'sell_point', 'specifications', 'shop_url', 'product_images', 'images', 'product_infos', 'app_introduce', 'applet_introduce' ]; - public function Good () : BelongsTo{ + public function good(): BelongsTo + { return $this->belongsTo(Good::class, 'item_id', 'itemid'); } }