From 186e05311eef468db16cfd22f8da9a2b4ebbc968 Mon Sep 17 00:00:00 2001 From: zhouchangcheng Date: Mon, 27 May 2024 15:53:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Good.php | 2 +- app/Models/GoodsItem.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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'); } }