src/Jobs/EsiBase.php
public function updateRefreshToken(): void
    {

        tap($this->token, function ($token) {

            // If no API call was made, the client would never have
            // been instantiated and auth information never updated.
            if (is_null($this->client) || $this->public_call)
                return;

            $last_auth = $this->client->getAuthentication();

            $token->token = $last_auth->access_token ?? '-';
            $token->expires_on = $last_auth->token_expires;

            $token->save();
        });
    }
public function updateRefreshToken(): void
    {

        tap($this->token, function ($token) {

            // If no API call was made, the client would never have
            // been instantiated and auth information never updated.
            if (is_null($this->client) || $this->public_call)
                return;

            $last_auth = $this->client->getAuthentication();

            $token->token = $last_auth->access_token ?? '-';
            $token->expires_on = $last_auth->token_expires;

            $token->save();
        });
    }
public function updateRefreshToken ( ) : void { tap ( $ this -> token , function ( $ token ) { // If no API call was made, the client would never have // been instantiated and auth information never updated. if ( is_null ( $ this -> client ) || $ this -> public_call ) return ; $ last_auth = $ this -> client -> getAuthentication ( ) ; $ token -> token = $ last_auth -> access_token ?? '-' ; $ token -> expires_on = $ last_auth -> token_expires ; $ token -> save ( ) ; } ) ; }
Update the access_token last used in the job,
along with the expiry time.
Update the access_token last used in the job along with the expiry time .