Download the PHP package ayles-software/xero-laravel without Composer
On this page you can find all versions of the php package ayles-software/xero-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ayles-software/xero-laravel
More information about ayles-software/xero-laravel
Files in ayles-software/xero-laravel
Informations about the package xero-laravel
Xero Laravel
Xero Laravel provides a wrapper around xero.
Requirements
- Laravel 6+
- PHP 7.2+
Installation
Install via using composer
Setup
Publish the config.
You now need to populate the config/xero-laravel.php
file with the credentials for
your Xero app. You can create apps and find therequired credentials in the
My Apps section of your Xero account.
Add the following variables to your .env
file.
The config file also contains scopes Xero access.
The offline_access
scope is required to obtain a new access token. Access tokens expire after 30 minutes.
For more information on scopes try the xero documentation.
Migrations
This package uses XeroAccess
model to manage access tokens. Run the migration to create this table.
OAuth flow
First you must authorize the application, this will require a controller and route to be setup. Once the application has been authorized then access to Xero is self managed within this package. Once the access token expires, a new one will be request as needed.
XeroOAuth::class
will provides the OAuth flow and regeneration of the access token.
Example of Controller for authorization.
Usage
For more information on usage checkout https://github.com/calcinai/xero-php.
Credit
This package was inspired by the talented people at Langley Foxall.
Available relationships
The list below shows all available relationships that can be used to access
data related to your Xero application (e.g. $xero->relationshipName
).
Note: Some of these relationships may not be available if the related service(s) are not enabled for your Xero account.
License
Xero Laravel is open-sourced software licensed under the MIT license.
All versions of xero-laravel with dependencies
laravel/framework Version ^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
calcinai/xero-php Version ^2.2.0