Download the PHP package macsidigital/laravel-xero without Composer

On this page you can find all versions of the php package macsidigital/laravel-xero. 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 laravel-xero

Laravel package for Xero Accounting

Latest Version on Packagist Build Status StyleCI Scrutinizer Code Quality Total Downloads

A little Laravel package to communicate with Xero.

Installation

You can install the package via composer:

The service provider should automatically register for For Laravel > 5.4.

For Laravel < 5.5, open config/app.php and, within the providers array, append:

Configuration file

Publish the configuration file

This will create a xero/config.php within your config directory. Check the Xero documentation for the relevant values in the config.php file. Ensure that the location of the RSA keys matches.

Usage

Everything has been setup to be similar to Laravel syntax.

We also use a little bit of magic to work with Xero's model names. In Xero there are a few different modules (Accounting, Payroll AU etc.), at the minute we only support a small part of the accounting area, but we have set naming so that additional modules can be added in future.

If the response is anything other than a '200' then we will throw an exception, so use try catch blocks.

So to use the conacts in the Accounting module we would use the following syntax.

Find all

The find all function returns a Laravel Collection so you can use all the Laravel Collection magic

Filtered

The filtered find function returns a Laravel Collection so you can use all the Laravel Collection magic

To only get a single item use the 'first' method

You can also just passs the name and value if it is to equal

Find by ID

Just like Laravel we can use the 'find' method to return a single matched result on the ID

Creating Items

We can create and update records using the save function, below is the full save script for a creation. Please note the functions for adding multi array items, like addresses.

Example

Here is an example usage case for querying for a contact, creating if not found and then creating an invoice

Resources

At present we have the following resources

We plan to add more resources in the future but setting up additional models is straight forward, below is the invoice model setup. If you create any models, then create a pull request and we will add into main repo.

Testing

At present there is no PHP Unit Testing, but we plan to add it in the future.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-xero with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^7.3
guzzlehttp/guzzle Version ~6.0|~5.0|~4.0
guzzlehttp/oauth-subscriber Version 0.3.*
illuminate/support Version ^6.0|^7.0
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 macsidigital/laravel-xero contains the following files

Loading the files please wait ....