Skip to content

Commit b068532

Browse files
authored
fix(users): eager load rank with users (#1174)
1 parent 8b6233a commit b068532

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/Models/User/User.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ class User extends Authenticatable implements MustVerifyEmail {
6767
'verified_name',
6868
];
6969

70+
/**
71+
* The relationships that should always be loaded.
72+
*
73+
* @var array
74+
*/
75+
protected $with = [
76+
'rank',
77+
];
78+
7079
/**
7180
* Whether the model contains timestamps to be saved and updated.
7281
*

0 commit comments

Comments
 (0)