pulkitjalan / xero-laravel
A Laravel 5 wrapper for Xero
Installs: 11 073
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- php: ^7.2
- calcinai/xero-php: ^1.8
- illuminate/support: ~5.8.0|^6.0
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
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.