Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 1a7c0ce

Browse files
committed
Construct a new instance in order to actually get the primary key name
1 parent 3c525ad commit 1a7c0ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TwoFactorAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function user() : BelongsTo
4848
{
4949
$model = $this->model();
5050

51-
return $this->belongsTo($model, 'user_id', $model->getKeyName());
51+
return $this->belongsTo($model, 'user_id', (new $model)->getKeyName());
5252
}
5353

5454
/**

0 commit comments

Comments
 (0)