PHPackages                             kz/lifx-php - 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. kz/lifx-php

ActiveLibrary[API Development](/categories/api)

kz/lifx-php
===========

lifx-php is a PHP package for the LIFX HTTP API.

v1.0.1(7y ago)156293[1 issues](https://github.com/kz/lifx-php/issues)MITPHPPHP &gt;=5.5.0

Since Oct 24Pushed 7y ago5 watchersCompare

[ Source](https://github.com/kz/lifx-php)[ Packagist](https://packagist.org/packages/kz/lifx-php)[ Docs](https://github.com/kz/lifx-php)[ RSS](/packages/kz-lifx-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

lifx-php
========

[](#lifx-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/29c75d794c88e231b693d055869c950a8968e0d260dd276f4edac4d3a90ab55f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b7a2f6c6966782d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kz/lifx-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/50c28b06821facd8f1e7ce8561180854b07d5e80e62339bf2e852d571c3b5695/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b7a2f6c6966782d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kz/lifx-php)[![Coverage Status](https://camo.githubusercontent.com/091660d89dac71aa668da2b430f22e0aaa705c09031992135cdaefa71752fea0/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6b7a2f6c6966782d7068702f6c6966782d7068702e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/kz/lifx-php)[![Quality Score](https://camo.githubusercontent.com/514ae04be53b6813fb934aac4505253aacc45d48fe4f48f6594100cdc88a8100/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b7a2f6c6966782d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kz/lifx-php)[![Total Downloads](https://camo.githubusercontent.com/b8ebee3fcbd8fe9521483b3456e55a8e472358174f5b997cd6003deef2d8378a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b7a2f6c6966782d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kz/lifx-php)

lifx-php is a PHP package for the LIFX HTTP API.

The author is not affiliated with LIFX and LIFX is not involved in the development of this package in any way.

**Request for stakeholder comments!** I am looking to gauge whether this package is still being used to decide whether to continue maintaining it. Please email me or open an issue to let me know whether you are looking to use any endpoints which are missing or whether you would like to see this package kept up to date.

Install
-------

[](#install)

Via Composer

```
$ composer require kz/lifx-php
```

Laravel Configuration
---------------------

[](#laravel-configuration)

lifx-php has optional support for Laravel and comes with a Service Provider and Facades for easy integration. The vendor/autoload.php is included by Laravel, so you don't have to require or autoload manually. Just see the instructions below.

After you have installed lifx-php, open your Laravel config file config/app.php and add the following lines.

In the $providers array add the service providers for this package:

```
Kz\Lifx\LifxServiceProvider::class,
```

Add the facade of this package to the $aliases array:

```
'Lifx' => Kz\Lifx\LifxFacade::class,
```

Now the Lifx Class will be auto-loaded by Laravel.

You also need to supply your API Token in your .env environment file:

```
LIFX_TOKEN=0000000000000000000000000000000000000000000000000000000000000000

```

Usage
-----

[](#usage)

```
$api_token = 'token';
$lifx = new Kz\Lifx\Lifx($api_token);
$lifx->toggleLights();
```

Laravel Usage
-------------

[](#laravel-usage)

```
// usage inside a laravel route
Route::get('/', function()
{
    $lifx = Lifx::all();

    return json_decode($lifx);
});
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Kelvin Zhang](https://github.com/kz)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.2% 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 ~231 days

Total

2

Last Release

2897d ago

### Community

Maintainers

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

---

Top Contributors

[![kz](https://avatars.githubusercontent.com/u/1910781?v=4)](https://github.com/kz "kz (23 commits)")[![HughbertD](https://avatars.githubusercontent.com/u/1580021?v=4)](https://github.com/HughbertD "HughbertD (4 commits)")[![kubacode](https://avatars.githubusercontent.com/u/4929328?v=4)](https://github.com/kubacode "kubacode (2 commits)")[![jamesmills](https://avatars.githubusercontent.com/u/557096?v=4)](https://github.com/jamesmills "jamesmills (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

lifxlifx-phplifx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kz-lifx-php/health.svg)

```
[![Health](https://phpackages.com/badges/kz-lifx-php/health.svg)](https://phpackages.com/packages/kz-lifx-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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