Skip to content

Commit 16b792b

Browse files
committed
Update WpUserMeta.php
1 parent a6bcd72 commit 16b792b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Models/WpUserMeta.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ class WpUserMeta extends Model
99
{
1010
use HasFactory;
1111

12-
public function user()
13-
{
14-
return $this->belongsTo(WpUser::class, 'ID');
15-
}
16-
1712
protected $fillable = ['user_id', 'meta_key', 'meta_value'];
1813

1914
protected $searchableFields = ['*'];
@@ -33,8 +28,8 @@ public function __construct(array $attributes = [])
3328
$this->table = $this->wpPrefix.'usermeta';
3429
}
3530

36-
public function userMeta()
31+
public function user()
3732
{
38-
return $this->hasMany(WpUserMeta::class, 'user_id');
33+
return $this->belongsTo(WpUser::class, 'ID');
3934
}
4035
}

0 commit comments

Comments
 (0)