src/TokenRepository.php
public function findValidToken($user, $client)
    {
        return $client->tokens()
                      ->whereUserId($user->getKey())
                      ->where('revoked', 0)
                      ->where('expires_at', '>', Carbon::now())
                      ->latest('expires_at')
                      ->first();
    }
public function findValidToken($user, $client)
    {
        return $client->tokens()
                      ->whereUserId($user->getKey())
                      ->where('revoked', 0)
                      ->where('expires_at', '>', Carbon::now())
                      ->latest('expires_at')
                      ->first();
    }
public function findValidToken ( $ user , $ client ) { return $ client -> tokens ( ) -> whereUserId ( $ user -> getKey ( ) ) -> where ( 'revoked' , 0 ) -> where ( 'expires_at' , '>' , Carbon :: now ( ) ) -> latest ( 'expires_at' ) -> first ( ) ; }
Find a valid token for the given user and client.

@param  \Illuminate\Database\Eloquent\Model  $user
@param  \Laravel\Passport\Client  $client
@return \Laravel\Passport\Token|null
Find a valid token for the given user and client .