PHP code example of flipninja / axcelerate-php

1. Go to this page and download the library: Download flipninja/axcelerate-php 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/ */

    

flipninja / axcelerate-php example snippets




use FlipNinja\Axcelerate\Axcelerate;
use FlipNinja\Axcelerate\Contacts\Enrolment;

$axcelerate = new Axcelerate($apiToken, $wsToken, 'https://stg.axcelerate.com.au/api/');

// Find a contact
$contact = $axcelerate->contacts()->find($user->id);

// Find a class/instance
$instance = $axcelerate->courses()->findInstance([
    "name" => "An instance name",
    "trainerContactID" => $teacher->id
]);

// Update a contact's competency status for a class/instance to complete
$contact->enrolmentForInstance($instance)->updateComptentecyStatus($competencyCode, Enrolment::COMPLETE);