Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 20, 2018
1 parent b05d0f3 commit 3213be8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ class Client extends Model
'revoked' => 'bool',
];

/**
* Get the user that the client belongs to.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo(
config('auth.providers.'.config('auth.guards.api.provider').'.model')
);
}

/**
* Get all of the authentication codes for the client.
*
Expand All @@ -61,18 +73,6 @@ public function tokens()
return $this->hasMany(Passport::tokenModel(), 'client_id');
}

/**
* Get the user that the client belongs to.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
$provider = config('auth.guards.api.provider');

return $this->belongsTo(config('auth.providers.'.$provider.'.model'));
}

/**
* Determine if the client is a "first party" client.
*
Expand Down

0 comments on commit 3213be8

Please sign in to comment.