PHP code example of phuocdaivl / sts-sdk

1. Go to this page and download the library: Download phuocdaivl/sts-sdk 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/ */

    

phuocdaivl / sts-sdk example snippets

bash
$data = [
    'username' => '0766808284',
    'fullname' => 'Phước Đại',
    'email'    => '[email protected]',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $umSDK->register($data);
bash
$phone    = '0766808284';
$password = 'abc123ABC';
$result   = $umSDK->resetPassword($phone, $password);
bash
$name = 'tenant001';
$result = $tmSDK->createTenant($name);
bash
$idTenant = 'f06e16bc-1035-4de3-93cc-96bdd21da4a5';
$connectionString = 'Server=localhost;port=3306;Database=tenant_01;user=root;password=';
$result = $tmSDK->createConnectionString($idTenant, $connectionString);
bash
$data = [
    'email'    => '[email protected]',
    'fullname' => 'Phước Đại',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $sysuSDK->register($data);
bash
$data = [
    'username' => 'usertn001',
    'email'    => '[email protected]',
    'fullname' => 'Phước Đại',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $tumSDK->register($data);
bash
$username = 'usertn001';
$password = 'abc123ABC';
$result   = $tumSDK->resetPassword($username, $password);