正在显示
2 个修改的文件
包含
3 行增加
和
3 行删除
@@ -89,8 +89,8 @@ class UserAddress extends Model | @@ -89,8 +89,8 @@ class UserAddress extends Model | ||
89 | if($data['isdefault'] == '1'){ | 89 | if($data['isdefault'] == '1'){ |
90 | self::where('user_id',$this['user_id'])->update(['isdefault'=>'0']); | 90 | self::where('user_id',$this['user_id'])->update(['isdefault'=>'0']); |
91 | } | 91 | } |
92 | - return $this->allowField(true) | ||
93 | - ->save(array_merge(compact('province_id', 'city_id', 'district_id'), $data), ['id'=>$this['id']]); | 92 | + return $this->get($this['id'])->allowField(true) |
93 | + ->save(array_merge(compact('province_id', 'city_id', 'district_id'), $data)); | ||
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
@@ -85,7 +85,7 @@ class UserSize extends Model | @@ -85,7 +85,7 @@ class UserSize extends Model | ||
85 | if(!empty($data['body_info']) && is_array($data['body_info'])){ | 85 | if(!empty($data['body_info']) && is_array($data['body_info'])){ |
86 | $data['body_info'] = json_encode($data['body_info']); | 86 | $data['body_info'] = json_encode($data['body_info']); |
87 | } | 87 | } |
88 | - return $this->allowField(true)->save($data, ['id'=>$this['id']]); | 88 | + return $this->get($this['id'])->allowField(true)->save($data); |
89 | } | 89 | } |
90 | 90 | ||
91 | /** | 91 | /** |
-
请 注册 或 登录 后发表评论