2017 © Pedro Peláez
 

library laravel-twinfield

Twinfield service provider for Laravel

image

willemo/laravel-twinfield

Twinfield service provider for Laravel

  • Friday, June 22, 2018
  • by willemo
  • Repository
  • 2 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 75 % Grown

The README.md

Laravel Twinfield

Twinfield service provider for Laravel 8, adding the functionality of the php-twinfield/twinfield API client., (*1)

Warning: this project is archived

This means that there will be no more updates or security fixes from Dependabot., (*2)

Requirements

This service provider is written for Laravel 8 and up and requires PHP 8.1 to run., (*3)

Installation

You can install this package with composer:, (*4)

composer require "willemo/laravel-twinfield:^2.0"

The package will be automatically discovered by your Laravel installation, so you don't need to add the service provider and facade to your app config file., (*5)

Need support for lower PHP or Laravel versions?

In that case you can install the ^1.0 version of this package, which is compatible with Laravel 5.5+ and PHP 7.2+., (*6)

Upgrading from version 0 to version 1

Between version 0.X.X and 1.X.X the file structure has been modified. Make sure all class references are correct after upgrading., (*7)

Configuration

Firstly you'll have to publish the config file:, (*8)

php artisan vendor:publish --provider="Willemo\LaravelTwinfield\TwinfieldServiceProvider"

Then you can configure the Twinfield API client in config/twinfield.php. The best way to configure your Twinfield API is by using environment variables., (*9)

Connect to the API with your credentials

You can either choose to use your credentials to connect to the Twinfield API:, (*10)

TWINFIELD_AUTH_TYPE=credentials
TWINFIELD_USERNAME=your_username
TWINFIELD_PASSWORD=your_password
TWINFIELD_ORGANISATION=your_organisation
TWINFIELD_OFFICE=your_office

Connect to the API using OAuth

Or you can use OAuth to connect to the Twinfield API:, (*11)

TWINFIELD_CLIENT_ID=your_client_id
TWINFIELD_CLIENT_SECRET=your_client_secret
TWINFIELD_RETURN_URL=https://example.org/oauth/return/url
TWINFIELD_ORGANISATION=your_organisation
TWINFIELD_OFFICE=your_office

If you wish to use the autoRedirect option of the PhpTwinfield API client, you can enable it in the config/twinfield.php file by setting 'autoRedirect' => true,., (*12)

Usage

You can use the Twinfield facade to get an API connector:, (*13)

$customerApiConnector = \Twinfield::get('Customer');

For usage of the API connectors and available connectors, check the PhpTwinfield docs., (*14)

The Versions

22/06 2018

dev-master

9999999-dev

Twinfield service provider for Laravel

  Sources   Download

GPL-3.0 GNU GPLv3

The Requires

 

The Development Requires

by Willem Oostendorp

22/06 2018

v1.0.1

1.0.1.0

Twinfield service provider for Laravel

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Willem Oostendorp

22/06 2018

v1.0.0

1.0.0.0

Twinfield service provider for Laravel

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Willem Oostendorp

01/03 2018

v0.0.6

0.0.6.0

Twinfield service provider for Laravel

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Willem Oostendorp

12/02 2018

v0.0.5

0.0.5.0

Twinfield service provider for Laravel

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Willem Oostendorp

09/01 2018

v0.0.4

0.0.4.0

Twinfield service provider for Laravel

  Sources   Download

GNU GPLv3

The Requires

 

The Development Requires

by Willem Oostendorp

18/12 2017

v0.0.3

0.0.3.0

Twinfield service provider for Laravel

  Sources   Download

GNU GPLv3

The Requires

 

The Development Requires

by Willem Oostendorp

18/12 2017

v0.0.2

0.0.2.0

Twinfield service provider for Laravel

  Sources   Download

GNU GPLv3

The Requires

 

The Development Requires

by Willem Oostendorp

18/12 2017

v0.0.1

0.0.1.0

Twinfield service provider for Laravel

  Sources   Download

GNU GPLv3

The Requires

 

The Development Requires

by Willem Oostendorp