PHPackages                             ngunyimacharia/laravel-openedx - 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. ngunyimacharia/laravel-openedx

ActiveLibrary[API Development](/categories/api)

ngunyimacharia/laravel-openedx
==============================

OpenEdx integration for laravel framework.

v1.0.6(7y ago)0661MITPHP

Since Apr 29Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ngunyimacharia/laravel-openedx)[ Packagist](https://packagist.org/packages/ngunyimacharia/laravel-openedx)[ Docs](https://github.com/ngunyimacharia/laravel-openedx)[ RSS](/packages/ngunyimacharia-laravel-openedx/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (8)Versions (9)Used By (0)

laravel-openedx
===============

[](#laravel-openedx)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3961b96a134e74b7af5170079d7f9e6dbb2ec7b0b558bb1082a1037a6494242d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e67756e79696d616368617269612f6c61726176656c2d6f70656e6564782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ngunyimacharia/laravel-openedx)[![Total Downloads](https://camo.githubusercontent.com/57a937c54b756efc4cc91a25a59627493751c1619b548fad25f150139b537455/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e67756e79696d616368617269612f6c61726176656c2d6f70656e6564782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ngunyimacharia/laravel-openedx)

Laravel connector for OpenEdx Learning Management System.

Installation
------------

[](#installation)

Via Composer

```
$ composer require ngunyimacharia/laravel-openedx
```

Configuration
-------------

[](#configuration)

1. Run `php artisan vendor:publish` to push the configuration file for the package. This file will be saved as `openedx.php`
2. Configure the following required values in your `.env` file

    MICROSITE\_BASE=example.com MICROSITE\_URL=http(s)://example.com LMS\_BASE=CMS\_BASE=LMS\_REGISTRATION\_URL=[https://courses.example.com/user\_api/v1/account/registration/](https://courses.example.com/user_api/v1/account/registration/)LMS\_LOGIN\_URL=[https://courses.example.com/user\_api/v1/account/login\_session/](https://courses.example.com/user_api/v1/account/login_session/)LMS\_RESET\_PASSWORD\_PAGE=[https://courses.example.com/user\_api/v1/account/password\_reset/](https://courses.example.com/user_api/v1/account/password_reset/)LMS\_RESET\_PASSWORD\_API\_URL=[https://courses.example.com/user\_api/v1/account/password\_change/](https://courses.example.com/user_api/v1/account/password_change/) (custom configured) REGISTER\_EMAIL\_FIELD=register\_email REGISTER\_PASSWORD\_FIELD=register\_password LOGIN\_EMAIL\_FIELD=login\_email LOGIN\_PASSWORD\_FIELD=login\_password EDX\_DB\_HOST=127.0.0.1 EDX\_DB\_USERNAME=root EDX\_DB\_PASSWORD=password EDX\_KEY=xxxxxxxxx (for api access) EDX\_SECRET=xxxxxxxxx (for api access)

Usage
-----

[](#usage)

Add openedx facade to file

`use ngunyimacharia\openedx\Facades\openedx;`

### Register user

[](#register-user)

```
Openedx::register([
'first_name'=>$first_name,
'last_name'=>$last_name,
'username'=>$username,
'email'=> $email,
'password'=> $hashed_password
]);

```

Response: Boolean (if operation is successful)

### Login user

[](#login-user)

```
Openedx::login(['username'  => $username', 'password'  => $password']);

```

Response: Cookies saved to ensure sign-in.

### Logout user

[](#logout-user)

```
Openedx::logout()

```

Response: Boolean (if operation is successful

*NB: It is recommended to create an iframe to call the LMS logout url as opposed to using this method to logout of the LMS.*

### Get all courses

[](#get-all-courses)

```
Openedx::getCourses()

```

Response: Array of all courses currently in LMS

### Get course overview

[](#get-course-overview)

```
Openedx::getOverview($courseId)

```

Response: Course overview

### Check enrollment status

[](#check-enrollment-status)

```
Openedx::checkEnrollmentStatus($courseId)

```

Response: Enrollment status of current authenticated user for the course specified.

### Enroll into course

[](#enroll-into-course)

```
Openedx::enroll($courseId)

```

Response: Boolean (Based on success of operation)

### Enrollments

[](#enrollments)

```
Openedx::enrollments()

```

Response: Array of all course enrollments LMS wide.

### Get course progress

[](#get-course-progress)

```
Openedx::getCourseProgress($courseId)

```

Response: String status of authenticated user in current course.

Changelog
---------

[](#changelog)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing (Pending)
-----------------

[](#testing-pending)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kelvin Macharia](https://github.com/ngunyimacharia)

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~2 days

Total

8

Last Release

2601d ago

Major Versions

v0.0.0 → v1.0.02019-04-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12905222?v=4)[Kelvin Macharia Ngunyi](/maintainers/ngunyimacharia)[@ngunyimacharia](https://github.com/ngunyimacharia)

---

Top Contributors

[![ngunyimacharia](https://avatars.githubusercontent.com/u/12905222?v=4)](https://github.com/ngunyimacharia "ngunyimacharia (25 commits)")

---

Tags

laravelopenedx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ngunyimacharia-laravel-openedx/health.svg)

```
[![Health](https://phpackages.com/badges/ngunyimacharia-laravel-openedx/health.svg)](https://phpackages.com/packages/ngunyimacharia-laravel-openedx)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[smodav/mpesa

M-Pesa API implementation

16267.1k1](/packages/smodav-mpesa)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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