PHP code example of mfachroni / smartklas-api

1. Go to this page and download the library: Download mfachroni/smartklas-api 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/ */

    

mfachroni / smartklas-api example snippets


use Smartklas\SmartklasApi;

$client = new SmartklasApi([
    'key' => 'API-KEY'
]);

$client->modul('presensi', 'ptk')->store([
    'lat' => '-7.305645503705854',
    'lng' => '112.73387993250381',
    'address' => 'Alamat Presensi',
    'datetime' => '2021-03-15 08:32:00',
    'nik' => 'NIK-PTK',
]);

use Smartklas\SmartklasApi;

$client = new SmartklasApi([
    'key' => 'API-KEY'
]);

$client->modul('presensi', 'siswa')->store([
    'lat' => '-7.305645503705854',
    'lng' => '112.73387993250381',
    'address' => 'Alamat Presensi',
    'datetime' => '2021-03-15 08:32:00',
    'nisn' => 'NISN-SISWA',
]);