PHPackages                             craig-ramsay/laravel-xero - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. craig-ramsay/laravel-xero

ActiveLibrary[API Development](/categories/api)

craig-ramsay/laravel-xero
=========================

A Laravel wrapper for Xero.

v2.0.0(5y ago)024MITPHPPHP &gt;=5.5.0

Since Jan 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/malinky/laravel-xero)[ Packagist](https://packagist.org/packages/craig-ramsay/laravel-xero)[ Docs](https://github.com/malinky/laravel-xero)[ RSS](/packages/craig-ramsay-laravel-xero/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Laravel Xero
============

[](#laravel-xero)

Laravel wrapper for the Xero PHP SDK developed by [Michael Calcinai](https://github.com/calcinai/xero-php).

Installation
------------

[](#installation)

Install the package via composer.

```
composer require craig-ramsay/laravel-xero
```

Laravel 5.5 uses Package Discovery, therefore the Service Provider and Facades are registered automatically.

Publish the configuration file by running the `php artisan vendor:publish` command. Add your Xero `consumer_key`, `consumer_secret` and `rsa_private_key` to the newly created `config/xero.php` file. The xero.php config file contains instructions on how to generate these values.

Usage
-----

[](#usage)

Use the classes by resolving from the Container or via the Facades. The examples below show different methods of accessing a Xero Private Application and returning the contacts list. The package also allows you to access Xero Partner or Public applications.

### Automatic Injection

[](#automatic-injection)

```
use XeroPHP\Application\PrivateApplication;

class ContactController {
    protected $xero;

    public function __construct(PrivateApplication $xero)
    {
        $this->xero = $xero;
    }

    public function index()
    {
        $contacts = $this->xero->load(\XeroPHP\Models\Accounting\Contact::class)->execute();
    }
}
```

### Resolve out of the Container

[](#resolve-out-of-the-container)

```
use XeroPHP\Application\PrivateApplication;

$xero = app(PrivateApplication::class);

$contacts = $xero->load(\XeroPHP\Models\Accounting\Contact::class)->execute();
```

or

```
$xero = app('xeroprivate');

$contacts = $xero->load(\XeroPHP\Models\Accounting\Contact::class)->execute();
```

### Facade

[](#facade)

```
use XeroPrivate;

$contacts = XeroPrivate::load(\XeroPHP\Models\Accounting\Contact::class)->execute();
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~500 days

Total

2

Last Release

2179d ago

Major Versions

v1.0.0 → v2.0.02020-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/54e9a3e7e755df4710e07894d849cb0872be30f54a5afbf08e8299aa37596a06?d=identicon)[craig-ramsay](/maintainers/craig-ramsay)

---

Top Contributors

[![malinky](https://avatars.githubusercontent.com/u/8988658?v=4)](https://github.com/malinky "malinky (11 commits)")

### Embed Badge

![Health badge](/badges/craig-ramsay-laravel-xero/health.svg)

```
[![Health](https://phpackages.com/badges/craig-ramsay-laravel-xero/health.svg)](https://phpackages.com/packages/craig-ramsay-laravel-xero)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
