PHPackages                             willemo/laravel-twinfield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. willemo/laravel-twinfield

AbandonedArchivedLibrary[API Development](/categories/api)

willemo/laravel-twinfield
=========================

Twinfield service provider for Laravel

v2.1.0(3y ago)35365GPL-3.0PHPPHP ^8.1

Since Dec 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/willemo/laravel-twinfield)[ Packagist](https://packagist.org/packages/willemo/laravel-twinfield)[ RSS](/packages/willemo-laravel-twinfield/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (4)Versions (12)Used By (0)

Laravel Twinfield
=================

[](#laravel-twinfield)

Twinfield service provider for Laravel 8, adding the functionality of the [`php-twinfield/twinfield`](https://github.com/php-twinfield/twinfield) API client.

Warning: this project is archived
---------------------------------

[](#warning-this-project-is-archived)

This means that there will be no more updates or security fixes from Dependabot.

Requirements
------------

[](#requirements)

This service provider is written for Laravel 8 and up and requires PHP 8.1 to run.

Installation
------------

[](#installation)

You can install this package with composer:

```
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.

Need support for lower PHP or Laravel versions?
-----------------------------------------------

[](#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+.

Upgrading from version 0 to version 1
-------------------------------------

[](#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.

Configuration
-------------

[](#configuration)

Firstly you'll have to publish the config file:

```
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.

### Connect to the API with your credentials

[](#connect-to-the-api-with-your-credentials)

You can either choose to use your credentials to connect to the Twinfield API:

```
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

[](#connect-to-the-api-using-oauth)

Or you can use OAuth to connect to the Twinfield API:

```
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,`.

Usage
-----

[](#usage)

You can use the `Twinfield` facade to get an API connector:

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

For usage of the API connectors and available connectors, [check the PhpTwinfield docs](https://github.com/php-twinfield/twinfield).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~181 days

Recently: every ~407 days

Total

11

Last Release

1301d ago

Major Versions

v0.0.6 → v1.0.02018-06-22

v1.0.2 → v2.0.02022-06-10

PHP version history (3 changes)v0.0.1PHP &gt;=7.1.0

v1.0.1PHP &gt;=7.2.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/df73215bdbc4610d19a0902fc99fe865c1f58b88feedd81bf480a6b42b4741ea?d=identicon)[willemo](/maintainers/willemo)

---

Top Contributors

[![willemo](https://avatars.githubusercontent.com/u/177329?v=4)](https://github.com/willemo "willemo (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![daanadriaan](https://avatars.githubusercontent.com/u/29752116?v=4)](https://github.com/daanadriaan "daanadriaan (3 commits)")[![it-can](https://avatars.githubusercontent.com/u/644288?v=4)](https://github.com/it-can "it-can (1 commits)")

### Embed Badge

![Health badge](/badges/willemo-laravel-twinfield/health.svg)

```
[![Health](https://phpackages.com/badges/willemo-laravel-twinfield/health.svg)](https://phpackages.com/packages/willemo-laravel-twinfield)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M717](/packages/sylius-sylius)[rapidez/core

Rapidez Core

1822.4k66](/packages/rapidez-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
