Download the PHP package langleyfoxall/xero-laravel without Composer

On this page you can find all versions of the php package langleyfoxall/xero-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package xero-laravel

💸 Xero Laravel

Xero Laravel allows developers to access the Xero accounting system using an Eloquent-like syntax.

Please note that this version of Xero Laravel supports the Xero OAuth 2.0 implementation. Older Xero apps using OAuth 1.x are no longer supported.

StyleCI

Installation

Xero Laravel can be easily installed using Composer. Just run the following command from the root of your project.

If you have never used the Composer dependency manager before, head to the Composer website for more information on how to get started.

Setup

First, run the following artisan command from the root of your project. This will publish the package configuration file.

You now need to populate the config/xero-laravel-lf.php file with the credentials for your Xero app(s). You can create apps and find the required credentials in the My Apps section of your Xero account.

If you only intend to use one Xero app, the standard configuration file should be sufficient. All you will need to do is add the following variables to your .env file.

OAuth 2.0 flow

In order for users to make use of your Xero app, they must first give your app permission to access their Xero account. To do this, your web application must do the following.

  1. Redirect the user to the Xero authorization URL.
  2. Capture the response from Xero, and obtain an access token.
  3. Retrieve the list of tenants (typically Xero organisations), and let the user select one.
  4. Store the access token and selected tenant ID against the user's account for future use.
  5. Before using the access token, check if it has expired and refresh it if necessary.

The controller below shows these steps in action.

By default, only a limited number of scopes are defined in the configuration file (space separated). You will probably want to add to the scopes depending on your application's intended purpose. For example adding the accounting.transactions scope allows you to manage invoices, and adding the accounting.contacts.read allows you to read contact information.

Xero's documentation provides a full list of available scopes.

Usage

To use Xero Laravel, you first need to get retrieve your user's stored access token and tenant id. You can use these to create a new XeroApp object which represents your Xero application.

You can then immediately access Xero data using Eloquent-like syntax. The following code snippet shows the available syntax. When multiple results are returned from the API they will be returned as Laravel Collection.

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.


All versions of xero-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
laravel/framework Version ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0
calcinai/xero-php Version ^2.2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package langleyfoxall/xero-laravel contains the following files

Loading the files please wait ....