2017 © Pedro Peláez
 

library lifx-php

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

image

kz/lifx-php

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

  • Wednesday, June 13, 2018
  • by kz
  • Repository
  • 5 Watchers
  • 10 Stars
  • 408 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

lifx-php

Latest Version on Packagist ![Software License][ico-license] Build Status Coverage Status ![Quality Score][ico-code-quality] Total Downloads, (*1)

lifx-php is a PHP package for the LIFX HTTP API., (*2)

The author is not affiliated with LIFX and LIFX is not involved in the development of this package in any way., (*3)

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., (*4)

Install

Via Composer, (*5)

``` bash $ composer require kz/lifx-php, (*6)


## 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: ``` php Kz\Lifx\LifxServiceProvider::class,

Add the facade of this package to the $aliases array:, (*7)

``` php 'Lifx' => Kz\Lifx\LifxFacade::class,, (*8)


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, (*9)


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

Laravel Usage

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

return json_decode($lifx);

});, (*11)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING for details., (*12)

Credits

License

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

The Versions

13/06 2018

dev-master

9999999-dev https://github.com/kz/lifx-php

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

  Sources   Download

MIT

The Requires

 

The Development Requires

lifx-php lifx

13/06 2018

v1.0.1

1.0.1.0 https://github.com/kz/lifx-php

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

  Sources   Download

MIT

The Requires

 

The Development Requires

lifx-php lifx

24/10 2017

1.0.0

1.0.0.0 https://github.com/kz/lifx-php

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

  Sources   Download

MIT

The Requires

 

The Development Requires

lifx-php lifx