PHPackages                             trexology/xero-laravel - 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. trexology/xero-laravel

ActiveLibrary[API Development](/categories/api)

trexology/xero-laravel
======================

Xero Service Provider for Laravel 5

v3.0.4(10y ago)0128MITPHPPHP &gt;=5.3.0

Since Jul 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Trexology/xero-laravel)[ Packagist](https://packagist.org/packages/trexology/xero-laravel)[ RSS](/packages/trexology-xero-laravel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (15)Used By (0)

Xero Service Provider for Laravel 5
===================================

[](#xero-service-provider-for-laravel-5)

A simple [Laravel 5](http://laravel.com) service provider for including the [PHP Xero API](https://github.com/XeroAPI/PHP-Xero).

No longer maintained
--------------------

[](#no-longer-maintained)

Please note the PHP-Xero wrapper library used by this service provider is no longer under active development. All development effort is going into the [XeroOAuth-PHP library](https://github.com/XeroAPI/XeroOAuth-PHP).

We will review this after Laravel 5 has been released and likely leave this active (but unsupported) for anyone still using it for their Laravel 4 apps.

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

[](#installation)

The Xero Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `Trexology/xero-laravel` package in your project's `composer.json`.

```
{
    "require": {
        "trexology/xero-laravel": "^3.0",
    },
}
```

Usage
-----

[](#usage)

To use the Xero Service Provider, you must register the provider when bootstrapping your Laravel application.

### Use Laravel Configuration

[](#use-laravel-configuration)

Create a new `config/xero.php` configuration file with the following options:

```
return [
    'key'           => '',
    'secret'        => '',
    'publicPath'    => '../config/xero/publickey.cer',
    'privatePath'   => '../config/xero/privatekey.pem',
    'format'        => 'json'
];
```

Find the `providers` key in `config/app.php` and register the Xero Service Provider.

```
    'providers' => [
        // ...
        'Trexology\XeroLaravel\XeroLaravelServiceProvider',
    ]
```

Find the `aliases` key in `config/app.php` and add in our `Xero` alias.

```
    'aliases' => [
        // ...
        'XeroLaravel'     => 'Trexology\XeroLaravel\Facades\XeroLaravel',
    ]
```

### Setting up the application

[](#setting-up-the-application)

Create public and private keys, and save them in /config/xero/ as publickey.cer and privatekey.pem.

For more info on setting up your keys, check out the [Xero documentation](http://developer.xero.com/documentation/advanced-docs/public-private-keypair/)

Example Usage
-------------

[](#example-usage)

```
$contact = [
    [
        "Name"        => $user['company']['name'],
        "FirstName"   => $user['firstname'],
        "LastName"    => $user['surname'],
    ]
];

$xero_contact = XeroLaravel::Contacts($contact);

```

Reference
---------

[](#reference)

- [PHP Xero API](https://github.com/XeroAPI/PHP-Xero)
- [Laravel website](http://laravel.com)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~83 days

Recently: every ~125 days

Total

13

Last Release

3694d ago

Major Versions

v1.0.2 → 4.1.x-dev2014-03-10

v1.0.3 → v2.0.02014-03-10

v2.0.4 → v3.0.12015-03-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/b989561807248ebfcf1de91db821bab9ebc9010afdefdccfb909073e47ca5430?d=identicon)[trexology](/maintainers/trexology)

---

Top Contributors

[![pauljohnston](https://avatars.githubusercontent.com/u/1242028?v=4)](https://github.com/pauljohnston "pauljohnston (12 commits)")[![pricecurrent](https://avatars.githubusercontent.com/u/4919983?v=4)](https://github.com/pricecurrent "pricecurrent (6 commits)")[![Trexology](https://avatars.githubusercontent.com/u/3056348?v=4)](https://github.com/Trexology "Trexology (6 commits)")[![istvankadar](https://avatars.githubusercontent.com/u/4022422?v=4)](https://github.com/istvankadar "istvankadar (4 commits)")

---

Tags

laravellaravel 5Laravel 4xero

### Embed Badge

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

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

###  Alternatives

[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[davispeixoto/laravel5-salesforce

Laravel 5 Salesforce Force.com PHP Toolkit port

47142.8k1](/packages/davispeixoto-laravel5-salesforce)[latrell/swagger

Swagger for Laravel 5

4962.8k](/packages/latrell-swagger)[philo/laravel-twitter

A simple Laravel 4 service provider for including the TwitterOAuth library.

5019.5k](/packages/philo-laravel-twitter)[ricardofontanelli/laravel-telegram

A simple and lightweight Laravel 4 and 5 wrapper to interact with Telegram Bot.

103.6k](/packages/ricardofontanelli-laravel-telegram)[davispeixoto/laravel-salesforce

Laravel 4 Salesforce Force.com PHP Toolkit port

1433.1k](/packages/davispeixoto-laravel-salesforce)

PHPackages © 2026

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