File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,18 @@ class Client extends Model
41
41
'revoked ' => 'bool ' ,
42
42
];
43
43
44
+ /**
45
+ * Get the user that the client belongs to.
46
+ *
47
+ * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
48
+ */
49
+ public function user ()
50
+ {
51
+ return $ this ->belongsTo (
52
+ config ('auth.providers. ' .config ('auth.guards.api.provider ' ).'.model ' )
53
+ );
54
+ }
55
+
44
56
/**
45
57
* Get all of the authentication codes for the client.
46
58
*
@@ -61,18 +73,6 @@ public function tokens()
61
73
return $ this ->hasMany (Passport::tokenModel (), 'client_id ' );
62
74
}
63
75
64
- /**
65
- * Get the user that the client belongs to.
66
- *
67
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
68
- */
69
- public function user ()
70
- {
71
- $ provider = config ('auth.guards.api.provider ' );
72
-
73
- return $ this ->belongsTo (config ('auth.providers. ' .$ provider .'.model ' ));
74
- }
75
-
76
76
/**
77
77
* Determine if the client is a "first party" client.
78
78
*
You can’t perform that action at this time.
0 commit comments