New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

sprint-digital/xero-laravel

๐Ÿ’ธ Access the Xero accounting system using an Eloquent-like syntax
1,001

Larablocks Analysis

sprint-digital/xero-laravel works with Laravel 12 (latest release v12.0.1, May 23, 2025).

Laravel 10 in earlier releases.

Recommendation checks

Use with care

Use with care: meets 0 of 4 checks.

  • Latest release doesn't support Laravel 13, the current version
  • No release in the last 12 months (last: May 23, 2025)
  • 22 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Quiet
  • Last stable release: May 23, 2025.
  • No releases in the last 12 months.
  • First released: Jul 25, 2023.
  • Monthly downloads: 22.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 4, 2026.

Install
composer require sprint-digital/xero-laravel
Latest Version:v12.0.1
PHP:^8.2
Laravel:12
Older releases:10
License:MIT
Last Updated:Jun 29, 2026
Links: GitHub  ·  Packagist
Maintainer: hoangho

๐Ÿ’ธ Xero Laravel for Sprint Digital

Latest Version on Packagist Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require sprint-digital/xero-laravel

You can publish and run the migrations with:

php artisan xero-laravel:install
php artisan migrate

If sprint-digital/sprint-digital/boilerplate-crud-generator is installed, you can generate the CRUD for the following models:

php artisan make:crud invoices
php artisan make:crud invoice_line_items

Setup

If you only intend to use one Xero app, the standard configuration file should be sufficient. All you will need to do is add the following variables to your .env file.

XERO_CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XERO_CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XERO_REDIRECT_URI={url}/xero/callback
XERO_WEBHOOK_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

In web.php add:

use App\Http\Controllers\XeroController;

Route::get('/xero/redirect', [XeroController::class, 'redirectUserToXero'])->name('xero.redirect');
Route::get('/xero/callback', [XeroController::class, 'handleCallbackFromXero'])->name('xero.callback');
Route::get('/xero/refresh', [XeroController::class, 'refreshAccessTokenIfNecessary'])->name('xero.refresh');

In api.php add:

use App\Http\Controllers\XeroWebhookController;

Route::apiResource('webhooks/xero', XeroWebhookController::class)->only(['store']);

You should protect these routes.

Xero's documentation provides a full list of available scopes.

Usage

Go to {url}/xero/redirect and your xero token will be saved to the database.

READ!!! the XeroController.php

After Authentication setup. You can run the xero pull commands:

php artisan xero:pull-contacts
php artisan xero:pull-items

Available relationships

The list below shows all available relationships that can be used to access data related to your Xero application (e.g. $xeroService->xero->relationshipName).

Note: Some of these relationships may not be available if the related service(s) are not enabled for your Xero account.

accounts
addresses
assetsAssetTypeBookDepreciationSettings
assetsAssetTypes
assetsOverviews
assetsSettings
attachments
bankTransactionBankAccounts
bankTransactionLineItems
bankTransactions
bankTransferFromBankAccounts
bankTransferToBankAccounts
bankTransfers
brandingThemes
contactContactPeople
contactGroups
contacts
creditNoteAllocations
creditNotes
currencies
employees
expenseClaimExpenseClaims
expenseClaims
externalLinks
filesAssociations
filesFiles
filesFolders
filesObjects
invoiceLineItems
invoiceReminders
invoices
itemPurchases
itemSales
items
journalJournalLines
journals
linkedTransactions
manualJournalJournalLines
manualJournals
organisationBills
organisationExternalLinks
organisationPaymentTerms
organisationSales
organisations
overpaymentAllocations
overpaymentLineItems
overpayments
payments
payrollAUEmployeeBankAccounts
payrollAUEmployeeHomeAddresses
payrollAUEmployeeLeaveBalances
payrollAUEmployeeOpeningBalances
payrollAUEmployeePayTemplateDeductionLines
payrollAUEmployeePayTemplateEarningsLines
payrollAUEmployeePayTemplateLeaveLines
payrollAUEmployeePayTemplateReimbursementLines
payrollAUEmployeePayTemplateSuperLines
payrollAUEmployeePayTemplates
payrollAUEmployeeSuperMemberships
payrollAUEmployeeTaxDeclarations
payrollAUEmployees
payrollAULeaveApplicationLeavePeriods
payrollAULeaveApplications
payrollAUPayItemDeductionTypes
payrollAUPayItemEarningsRates
payrollAUPayItemLeaveTypes
payrollAUPayItemReimbursementTypes
payrollAUPayItems
payrollAUPayRuns
payrollAUPayrollCalendars
payrollAUPayslipDeductionLines
payrollAUPayslipEarningsLines
payrollAUPayslipLeaveAccrualLines
payrollAUPayslipLeaveEarningsLines
payrollAUPayslipReimbursementLines
payrollAUPayslipSuperannuationLines
payrollAUPayslipTaxLines
payrollAUPayslipTimesheetEarningsLines
payrollAUPayslips
payrollAUSettingAccounts
payrollAUSettingTrackingCategories
payrollAUSettings
payrollAUSuperFundProducts
payrollAUSuperFundSuperFunds
payrollAUSuperFunds
payrollAUTimesheetTimesheetLines
payrollAUTimesheets
payrollUSEmployeeBankAccounts
payrollUSEmployeeHomeAddresses
payrollUSEmployeeMailingAddresses
payrollUSEmployeeOpeningBalances
payrollUSEmployeePayTemplates
payrollUSEmployeePaymentMethods
payrollUSEmployeeSalaryAndWages
payrollUSEmployeeTimeOffBalances
payrollUSEmployeeWorkLocations
payrollUSEmployees
payrollUSPayItemBenefitTypes
payrollUSPayItemDeductionTypes
payrollUSPayItemEarningsTypes
payrollUSPayItemReimbursementTypes
payrollUSPayItemTimeOffTypes
payrollUSPayItems
payrollUSPayRuns
payrollUSPaySchedules
payrollUSPaystubBenefitLines
payrollUSPaystubDeductionLines
payrollUSPaystubEarningsLines
payrollUSPaystubLeaveEarningsLines
payrollUSPaystubReimbursementLines
payrollUSPaystubTimeOffLines
payrollUSPaystubTimesheetEarningsLines
payrollUSPaystubs
payrollUSSalaryandWages
payrollUSSettingAccounts
payrollUSSettingTrackingCategories
payrollUSSettings
payrollUSTimesheetTimesheetLines
payrollUSTimesheets
payrollUSWorkLocations
phones
prepaymentAllocations
prepaymentLineItems
prepayments
purchaseOrderLineItems
purchaseOrders
receiptLineItems
receipts
repeatingInvoiceLineItems
repeatingInvoiceSchedules
repeatingInvoices
reportBalanceSheets
reportBankStatements
reportBudgetSummaries
reportProfitLosses
reportReports
reportTaxTypes
salesTaxBases
salesTaxPeriods
taxRateTaxComponents
taxRates
taxTypes
trackingCategories
trackingCategoryTrackingOptions
userRoles
users

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

sprint-digital/boilerplate-crud-generator

This package is intended to be used with sprint-digital/boilerplate-api-app

3,813 0
sprint-digital/sprint-backup

This is my package sprint-backup

1,254 1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440

Version History

Version Released PHP Laravel License
v12.0.1 ^8.2 ^12.0 MIT
v10.1.4 ^8.1 ^10.0 MIT
v10.1.3 ^8.1 ^10.0 MIT
v10.1.2 ^8.1 ^10.0 MIT
v10.1.1 ^8.1 ^10.0 MIT