PHP code example of exposuresoftware / laravel-zway

1. Go to this page and download the library: Download exposuresoftware/laravel-zway library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

exposuresoftware / laravel-zway example snippets




use ExposureSoftware\LaravelWave\Facades\ZwaveFacade as Zwave;

// ...

Zwave::login();



use ExposureSoftware\LaravelWave\Zwave\Zwave;

// ...

/** @var Zwave $zwave */
$zwave = App::make(Zwave::class);
$zwave->login();



use ExposureSoftware\LaravelWave\Zwave\Zwave;

class Foo
{
    /** @var Zwave */
    private $zwave;
    
    public function __construct(Zwave $zwave) {
        $this->zwave = $zwave;
    }
    
    public function myMethod()
    {
        $this->zwave->login();
        // ...
    }
}



use ExposureSoftware\LaravelWave\Zwave\Zwave;
use GuzzleHttp\Client;

// ...

$zwave = new Zwave(new Client());

php artisan help zwave:fetch-devices