Laravel Xero

Is Connected

Anytime you need to check if Xero is authenticated you can call a ->isConnected method. The method returns a boolean.

To do an action when a Xero is not connected can be done like this:

if (! Xero::isConnected()) {
    return redirect('xero/connect');
}

Help support the blog so that I can continue creating new content!

Sponsor

Fathom Analytics $10 discount on your first invoice using this link

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.