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

ActiveLibrary[API Development](/categories/api)

venturecraft/xero-laravel
=========================

Xero Service Provider for Laravel 4

33.3k2[1 PRs](https://github.com/VentureCraft/xero-laravel/pulls)PHP

Since Apr 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/VentureCraft/xero-laravel)[ Packagist](https://packagist.org/packages/venturecraft/xero-laravel)[ RSS](/packages/venturecraft-xero-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Xero Service Provider for Laravel 4
===================================

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

Originally forked from

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

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

[](#installation)

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

```
{
	"require": {
		"laravel/framework": "4.0.*",
		"venturecraft/xero-laravel": "dev-master"
	},
	"minimum-stability": "dev"
}
```

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 `app/config/xero.php` configuration file with the following options:

```
return array(
    'key'           => '',
    'secret'        => '',
    'publicPath'    => '../app/config/xero/publickey.cer',
    'privatePath'   => '../app/config/xero/privatekey.pem'
);
```

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

```
    'providers' => array(
        // ...
        'Venturecraft\XeroLaravel\XeroLaravelServiceProvider',
    )
```

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

```
    'aliases' => array(
        // ...
        'XeroLaravel' 	  => 'Venturecraft\XeroLaravel\Facades\XeroLaravel',
    )
```

### Setting up the application

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

Create public and private keys, and save them in /app/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)

**Create Contact**

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

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

```

**Get Contacts with WHERE clause &amp; paging**

```
$where = "ContactNumber!=null&IsCustomer=true";
$page  = 1;
print_r(XeroLaravel::Contacts(false, false, $where, false, $page));

```

Reference
---------

[](#reference)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/37659155ef5a56509fda5ddba837c0b6a13cc21d09146551c2646d87779eb15e?d=identicon)[duellsy](/maintainers/duellsy)

---

Top Contributors

[![duellsy](https://avatars.githubusercontent.com/u/330539?v=4)](https://github.com/duellsy "duellsy (8 commits)")[![latheesan-k](https://avatars.githubusercontent.com/u/6196415?v=4)](https://github.com/latheesan-k "latheesan-k (3 commits)")[![Toyinster](https://avatars.githubusercontent.com/u/2857044?v=4)](https://github.com/Toyinster "Toyinster (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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