From b20abf00d663f93c4bad2f0995422ceaa2871866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Tue, 9 Aug 2022 20:05:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#10000=20=E8=A7=84=E6=A0=BC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Goods.php | 8 +++++++- app/Models/GoodsSku.php | 14 +++++++++++++- resources/lang/zh-CN/permission.php | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/Models/Goods.php b/app/Models/Goods.php index f9f9ff2..7919336 100644 --- a/app/Models/Goods.php +++ b/app/Models/Goods.php @@ -15,7 +15,13 @@ class Goods extends Model 'brand_id', ]; - protected $guarded = []; + protected $fillable = [ + 'title', + 'img_url', + 'type_id', + 'brand_id', + 'goods_code', + ]; /** * 多规格 diff --git a/app/Models/GoodsSku.php b/app/Models/GoodsSku.php index 19c1770..0004a6d 100644 --- a/app/Models/GoodsSku.php +++ b/app/Models/GoodsSku.php @@ -19,7 +19,19 @@ class GoodsSku extends Model * * @var array */ - protected $guarded = []; + protected $fillable = [ + 'goods_id', + 'title', + 'sku_code', + 'status', + 'num', + 'stock', + 'cost', + 'two_days_ago_num', + 'yesterday_num', + 'reference_price', + 'reserve', + ]; protected $hidden = ['created_at']; diff --git a/resources/lang/zh-CN/permission.php b/resources/lang/zh-CN/permission.php index 7ac3875..3a59603 100644 --- a/resources/lang/zh-CN/permission.php +++ b/resources/lang/zh-CN/permission.php @@ -37,7 +37,7 @@ return [ 'name' => '规格查看', 'parent_id' => 2, ], - 'goods_skus.udpate' => [ + 'goods_skus.update' => [ 'id' => 25, 'name' => '规格更新', 'parent_id' => 2,