Browse Source

fixed:用户端-微信登录-社交账号关联

刘学玺 3 months ago
parent
commit
b14adacdfc
1 changed files with 3 additions and 22 deletions
  1. 3 22
      app/Models/MemberSocialAccount.php

+ 3 - 22
app/Models/MemberSocialAccount.php

@@ -14,34 +14,15 @@ class MemberSocialAccount extends Model
 
     protected $table = 'member_social_accounts';
 
-    /**
-     * 允许批量赋值的属性
-     *
-     * @var array<string>
-     */
-    protected $fillable = [
-        'user_id',
-        'platform',
-        'openid',
-        'unionid',
-        'nickname',
-        'avatar',
-        'gender',
-        'country',
-        'province',
-        'city',
-        'access_token',
-        'refresh_token',
-        'expires_in',
-        'state',
-    ];
+    protected $guarded = [];
 
     /**
      * @Author FelixYin
      *
      * @description 社交账号所属会员
      */
-    public function user() {
+    public function user()
+    {
         return $this->belongsTo('App\Models\MemberUser', 'user_id', 'id', null);
     }