We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 738d80f commit 9c6b579Copy full SHA for 9c6b579
1 file changed
app/Models/User.php
@@ -12,6 +12,13 @@ class User extends Authenticatable
12
{
13
use HasApiTokens, HasFactory, Notifiable;
14
15
+ /**
16
+ * The primary key for the model.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $primaryKey = null;
21
+
22
/**
23
* The attributes that are mass assignable.
24
*
@@ -42,4 +49,18 @@ class User extends Authenticatable
42
49
protected $casts = [
43
50
'email_verified_at' => 'datetime',
44
51
];
52
53
54
55
+ * Create a new user instance.
56
57
+ * @param array $attributes
58
+ * @return void
59
60
+ public function __construct(array $attributes = [])
61
+ {
62
+ parent::__construct($attributes);
63
64
+ $this->primaryKey = config('cognito.user_subject_uuid', 'id');
65
+ }
45
66
}
0 commit comments