Download the PHP package dcodegroup/laravel-xero-oauth without Composer
On this page you can find all versions of the php package dcodegroup/laravel-xero-oauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dcodegroup/laravel-xero-oauth
More information about dcodegroup/laravel-xero-oauth
Files in dcodegroup/laravel-xero-oauth
Package laravel-xero-oauth
Short Description Simple package which dcode uses to handle the connection to xero for all projects. Provides endpoints for UI and callbacks for Xero
License MIT
Informations about the package laravel-xero-oauth
Laravel Xero
This package provides the standard xero connection functionality used in most projects.
Installation
You can install the package via composer:
Then run the install command.
This will publish the configuration file and the migration file.
Run the migrations
Configuration
Most of configuration has been set the fair defaults. However you can review the configuration file at config/laravel-xero-oauth.php
and adjust as needed
If you want to have the oauth screens appear within your sites layout ensure to configure the environment variable. eg.
LARAVEL_XERO_OAUTH_APP_LAYOUT=layouts.admin
Usage
The package provides an endpoints which you can use. See the full list by running
More Information
example.com/xero
Which is where you will generate the link to authorise xero. This is by default protected auth middleware but you can modify in the configuration. This is where you want to link to in your admin and possibly a new window
example.com/xero/callback
This is the route for which xero will redirect back to after the oauth has occurred. This is excluded from the middleware auth. You can change this list in the configuration also.
BaseXeroService
The package has a BaseXeroService
class located at Dcodegroup\LaravelXeroOauth\BaseXeroService
So your application should have its own XeroService extend this base class as the initialisation is already done.
Runtime
You can check if the connection exists with the below code. (This will not work once ->getConfig()
is removed in Guzzle 8 https://github.com/guzzle/guzzle/issues/3114 )
All versions of laravel-xero-oauth with dependencies
calcinai/xero-php Version ^2.5
laravel/framework Version ^7.0|^8.0|^9.0|^10.0|^11.0
xeroapi/xero-php-oauth2 Version ^2.1
league/oauth2-client Version 1.*|2.*