Laravel Xero

Disconnect

To disconnect from Xero call a ->disconnect() method.

The disconnect will send a POST request to Xero to revoke the connection, in addition, the stored token will be deleted.

Xero::disconnect();

Typically, you only want to run this is there is a connection, so it makes sense to wrap this in a ->isConnected() check:

if (Xero::isConnected()) {
    Xero::disconnect();
}

Copyright © 2024 Laravel - All rights reserved.