PHPackages                             nelc/laravel-nelc-xapi-integration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. nelc/laravel-nelc-xapi-integration

ActiveLibrary[API Development](/categories/api)

nelc/laravel-nelc-xapi-integration
==================================

xAPI Integration with NELC (National Center for e-Learning) - Laravel Package

32.6k6PHP

Since Jun 29Pushed 5d ago2 watchersCompare

[ Source](https://github.com/nelc/laravel-lrs-package)[ Packagist](https://packagist.org/packages/nelc/laravel-nelc-xapi-integration)[ RSS](/packages/nelc-laravel-nelc-xapi-integration/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Nelc Xapi Integration
=============================

[](#laravel-nelc-xapi-integration)

Laravel package for integrating with the Saudi National Center for e-Learning (NELC) xAPI system.

---

🌐 [English Version](#english-documentation) | [النسخة العربية](#%D8%A7%D9%84%D9%88%D8%AB%D8%A7%D8%A6%D9%82-%D8%A8%D8%A7%D9%84%D9%84%D8%BA%D8%A9-%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-english-version--النسخة-العربية)

---

English Documentation
---------------------

[](#english-documentation)

### Features

[](#features)

- Full support for all NELC-required xAPI statements.
- Flexible configuration: Use global config or override per request.
- Automatic browser and OS metadata detection.
- Comprehensive documentation for all use cases.

### Installation

[](#installation)

1. **Install Package:** `composer require bzzix/laravel-lrs-package`
2. **Publish Config:** `php artisan vendor:publish --provider="Bzzix\LaravelLrsPackage\NelcXapiServiceProvider"`
3. **Environment (.env):**

```
LRS_ENDPOINT=https://your-lrs-endpoint.com/xapi/statements
LRS_USERNAME=your_key
LRS_PASSWORD=your_secret
LRS_PLATFORM_AR="Platform Name AR"
LRS_PLATFORM_EN="Platform Name EN"
LRS_PLATFORM="SHORT_ID"
```

### Usage Reference (Statements)

[](#usage-reference-statements)

All interactions are called using a single `$data` array.

#### 1. Registered

[](#1-registered)

Sent when a student enrolls in a course.

```
$xapi->Registered([
    'name' => '1234567890', // Student National ID
    'email' => 'student@email.com',
    'courseId' => 'Course URL',
    'courseName' => 'Course Title',
    'courseDesc' => 'Course Description',
    'instructor' => 'Instructor Name',
    'inst_email' => 'instructor@email.com',
    // Optional NELC Extensions
    'duration' => 'PT10H', // ISO 8601 Duration
    'learnerFullName' => 'Full Name',
    'learnerMobileNo' => '+966...',
    'learnerNationality' => 'Saudi',
    'dateOfBirth' => 'YYYY-MM-DD',
    'lmsUrl' => 'LMS Base URL'
]);
```

#### 2. Initialized

[](#2-initialized)

Sent when a student starts an activity.

```
$xapi->Initialized([
    'name' => '1234567890', // National ID
    'email' => '...',
    'courseId' => '...',
    'courseName' => '...',
    'courseDesc' => '...',
    'instructor' => '...',
    'inst_email' => '...'
]);
```

#### 3. Watched

[](#3-watched)

Sent when a student interacts with video content.

```
$xapi->Watched([
    'name' => '1234567890',
    'lessonUrl' => 'Video URL',
    'lessonName' => 'Video Title',
    'completion' => true,
    'duration' => 'PT5M',
    'courseId' => '...',
    // ... basic info
]);
```

#### 4. Attempted (Quiz/Assessment)

[](#4-attempted-quizassessment)

```
$xapi->Attempted([
    'name' => '1234567890',
    'quizUrl' => '...',
    'attempNumber' => '1',
    'scaled' => 0.9, // 0 to 1
    'raw' => 90,
    'min' => 0,
    'max' => 100,
    'completion' => true,
    'success' => true,
    // ... basic info
]);
```

#### 5. Full Statement List

[](#5-full-statement-list)

The library supports: `Registered`, `Initialized`, `Watched`, `CompletedLesson`, `CompletedUnit`, `CompletedCourse`, `Progressed`, `Attempted`, `Earned`, `Rated`.

---

الوثائق باللغة العربية
----------------------

[](#الوثائق-باللغة-العربية)

### المميزات

[](#المميزات)

- دعم كامل لكافة التفاعلات المطلوبة من NELC.
- مرونة عالية: جلب الإعدادات من الكونفيج أو تجاوزها لكل طلب.
- معالجة تلقائية لبيانات المتصفح ونظام التشغيل.

### الإعداد الأساسي

[](#الإعداد-الأساسي)

1. **التثبيت:** `composer require bzzix/laravel-lrs-package`
2. **النشر:** `php artisan vendor:publish --provider="Bzzix\LaravelLrsPackage\NelcXapiServiceProvider"`
3. **البيئة (.env):**

```
LRS_ENDPOINT=https://your-lrs-endpoint.com/xapi/statements
LRS_USERNAME=your_key
LRS_PASSWORD=your_secret
```

### مرجع الاستخدام (الحالات)

[](#مرجع-الاستخدام-الحالات)

#### 1. التسجيل في دورة (Registered)

[](#1-التسجيل-في-دورة-registered)

```
$xapi->Registered([
    'name' => '1234567890', // رقم الهوية الوطنية للطالب
    'email' => 'student@email.com',
    'courseId' => 'رابط الدورة',
    'courseName' => 'اسم الدورة',
    'courseDesc' => 'وصف الدورة',
    'instructor' => 'اسم المحاضر',
    'inst_email' => 'بريد المحاضر',
    'duration' => 'PT10H',
    'learnerFullName' => 'الاسم الرباعي',
    'learnerMobileNo' => '+966...',
    'learnerNationality' => 'Saudi',
    'dateOfBirth' => 'YYYY-MM-DD'
]);
```

#### 2. حل اختبار (Attempted)

[](#2-حل-اختبار-attempted)

```
$xapi->Attempted([
    'name' => '1234567890',
    'quizUrl' => 'رابط الاختبار',
    'attempNumber' => '1',
    'scaled' => 0.9,
    'raw' => 90,
    'min' => 0,
    'max' => 100,
    'completion' => true,
    'success' => true,
    'courseId' => '...',
    'courseName' => '...',
    // ... البيانات الأساسية
]);
```

---

Support &amp; Contact | الدعم والتواصل
--------------------------------------

[](#support--contact--الدعم-والتواصل)

- **Email:**
- **Website:** [bzzix.com](https://bzzix.com)
- **WhatsApp:**
    - [+20 10 62332549](https://wa.me/201062332549)
    - [+20 1000944804](https://wa.me/201000944804)

Developed by **Bzzix** Team. "# laravel-lrs-package"

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance65

Regular maintenance activity

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c6d5d3f48ce32b910ef68a79251930b8d10bb24e4054553265a04b1fc7947da?d=identicon)[nelc](/maintainers/nelc)

---

Top Contributors

[![lamoud](https://avatars.githubusercontent.com/u/148651072?v=4)](https://github.com/lamoud "lamoud (14 commits)")[![alqahtani](https://avatars.githubusercontent.com/u/226227?v=4)](https://github.com/alqahtani "alqahtani (2 commits)")[![khalidreemy](https://avatars.githubusercontent.com/u/46654145?v=4)](https://github.com/khalidreemy "khalidreemy (1 commits)")

### Embed Badge

![Health badge](/badges/nelc-laravel-nelc-xapi-integration/health.svg)

```
[![Health](https://phpackages.com/badges/nelc-laravel-nelc-xapi-integration/health.svg)](https://phpackages.com/packages/nelc-laravel-nelc-xapi-integration)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
