pulkitjalan/xero-laravel

This package is abandoned and no longer maintained. No replacement package was suggested.

A Laravel 5 wrapper for Xero

2.0.1 2019-09-06 08:00 UTC

This package is auto-updated.

Last update: 2023-05-11 19:53:15 UTC


README

This project is no longer maintained.

Xero Laravel

A Laravel wrapper for Xero

Total Downloads

Requirements

  • PHP >= 7.2
  • php_curl extension - ensure a recent version (7.30+)
  • php_openssl extension

This package wraps calcinai/xero-php package.

Installation

Require the package

composer require pulkitjalan/xero-laravel

Laravel 5.5 uses Package Auto-Discovery, so you don't need to manually add the ServiceProvider.

If you don't use auto-discovery, add the following to the providers array in your config/app.php

PulkitJalan\Xero\XeroServiceProvider::class,

Next add the following to the aliases array in your config/app.php. Pick and choose if you want or add all 3.

'XeroPrivate' => PulkitJalan\Xero\Facades\XeroPrivate::class,
'XeroPublic' => PulkitJalan\Xero\Facades\XeroPublic::class,
'XeroPartner' => PulkitJalan\Xero\Facades\XeroPartner::class,

Next run php artisan vendor:publish --provider="PulkitJalan\Xero\XeroServiceProvider" to publish the config file.

Usage

Since this package wraps calcinai/xero-php, have a look at the readme there for further details.

Example:

use XeroPHP\Application\PrivateApplication

class App {
    protected $xero;

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

or

use XeroPHP\Application\PrivateApplication

$xero = app(PrivateApplication::class);

// or

$xero = app('XeroPrivate');

or use the facades.

Similar Packages