PHP code example of flooris / laravel-xelion

1. Go to this page and download the library: Download flooris/laravel-xelion 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/ */

    

flooris / laravel-xelion example snippets


use Illuminate\Support\Facades\App;
use Flooris\XelionClient\XelionService;
use Flooris\XelionClient\Model\XelionApiCredentialsModel;
use Flooris\XelionClient\HttpClient\XelionApiConnector;
use Flooris\XelionClient\ModelPaginator\XelionUserPaginator;

$baseUrl = "https://xelion01.example.com";
$username = "some-api-user";
$password = "super-secret";
$version = "v1";
$tenant = "tenant01";
$token = null;

$credentials = new XelionApiCredentialsModel(
  $baseUrl,
  $username,
  $password,
  $version,
  $tenant,
  $token
);

/** @var XelionService $service */
$service = App::make(XelionService::class);

$userCollection =  $service->connect($credentials)
    ->userPaginator()
    ->getAll();