lifx-php is a PHP package for the LIFX HTTP API
Switch branches/tags
Nothing to show
Clone or download


Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.


Via Composer

$ composer require kz/lifx-php

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:


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:



$api_token = 'token';
$lifx = new Kz\Lifx\Lifx($api_token);

Laravel Usage

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

    return json_decode($lifx);

Change log

Please see CHANGELOG for more information what has changed recently.


$ composer test


Please see CONTRIBUTING for details.



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