msaaq / nelc-laravel
xAPI Integration with Saudi NELC (National Center for e-Learning) for your Laravel app
Installs: 8 092
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/support: ^9.0|^10.0|^11.0
- msaaq/nelc-xapi-php-sdk: ^1.2|^1.3
This package is auto-updated.
Last update: 2025-03-29 00:53:45 UTC
README
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