Skip to content

xAPI Integration with Saudi NELC (National Center for e-Learning) for your Laravel app

License

Notifications You must be signed in to change notification settings

msaaqcom/nelc-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NELC Laravel Integration

xAPI Integration with Saudi NELC (National Center for e-Learning) for your Laravel app

Installation

You can install the package via composer:

composer require msaaq/nelc-laravel

After install the package you need to set API credentials in config/services.php file:

[
    // ...
    
    'nelc' => [
        'key' => env('NELC_KEY'),
        'secret' => env('NELC_SECRET'),
        'platform' => [
            'name' => env('NELC_PLATFORM_NAME'),
            'identifier' => env('NELC_PLATFORM_IDENTIFIER'),
        ],
        'sandbox' => env('NELC_SANDBOX', false),
    ],
]

Usage

Now you can send xAPI statements to NELC using Msaaq\NelcLaravel\Nelc facade:

use Msaaq\NelcLaravel\Nelc;

app(Nelc::class)->sendStatement($statement);

Or

use Nelc;

Nelc::sendStatement($statement);

Or from your controller like this:

use Msaaq\NelcLaravel\Nelc;

class MyController extends Controller
{
    public function index(Request $request, Nelc $nelc)
    {
        $nelc->sendStatement($statement);
    }
}

Statements

For more information about the statements, please visit nelc-xapi-php-sdk

About

xAPI Integration with Saudi NELC (National Center for e-Learning) for your Laravel app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages