Skip to content

Commit 3213be8

Browse files
committed
formatting
1 parent b05d0f3 commit 3213be8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Client.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ class Client extends Model
4141
'revoked' => 'bool',
4242
];
4343

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+
4456
/**
4557
* Get all of the authentication codes for the client.
4658
*
@@ -61,18 +73,6 @@ public function tokens()
6173
return $this->hasMany(Passport::tokenModel(), 'client_id');
6274
}
6375

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-
7676
/**
7777
* Determine if the client is a "first party" client.
7878
*

0 commit comments

Comments
 (0)