PHPackages                             escolalms/courses - 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. escolalms/courses

ActivePackage

escolalms/courses
=================

Escola Headless LMS Courses

0.4.45(9mo ago)597.2k↑20%120MITPHPPHP &gt;=7.4CI passing

Since Apr 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/EscolaLMS/Courses)[ Packagist](https://packagist.org/packages/escolalms/courses)[ RSS](/packages/escolalms-courses/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (209)Used By (20)

Courses
=======

[](#courses)

Courses and content package

[![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Courses/)[![codecov](https://camo.githubusercontent.com/fe2ded5b7545db770429f3285107562bb94eeb2cfecfa73f3901bbd39fd0ebd6/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f436f75727365732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4e52414e34523841475a)](https://codecov.io/gh/EscolaLMS/Courses)[![phpunit](https://github.com/EscolaLMS/Courses/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Courses/actions/workflows/test.yml)[![downloads](https://camo.githubusercontent.com/6d544b2391aefc76703de39513f2220f45f688c94b51c517551721ad2d3843f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6573636f6c616c6d732f636f7572736573)](https://packagist.org/packages/escolalms/courses)[![downloads](https://camo.githubusercontent.com/771365ad917e6389c2c172f00554579ca544bf455a698e298f7325f7b47e3751/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573636f6c616c6d732f636f7572736573)](https://packagist.org/packages/escolalms/courses)[![downloads](https://camo.githubusercontent.com/1b2460a0cc4426c5f59878de5042b7b13a8d7f1d94939b51d9e5b578a10ac50b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573636f6c616c6d732f636f7572736573)](https://packagist.org/packages/escolalms/courses)[![Maintainability](https://camo.githubusercontent.com/a7a11bc808d5fc966372dd6a3df45e9e09ea7d864c9d376b55f0abbc15bbda30/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30633965323539336662333065323034386639352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/EscolaLMS/Courses/maintainability)[![Mutation testing badge](https://camo.githubusercontent.com/094c5a365c19f1260dc857e3585dd866013b3679ca11c1858f65533ed8de675d/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532464573636f6c614c4d53253246436f75727365732532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/EscolaLMS/Courses/main)

What does it do
---------------

[](#what-does-it-do)

This package is used for creating Course for EscolaLms.

Installing
----------

[](#installing)

- `composer require escolalms/courses`
- `php artisan migrate`
- `php artisan db:seed --class="EscolaLms\Courses\Database\Seeders\CoursesPermissionSeeder"`

Schedule
--------

[](#schedule)

- Schedules are available in ScheduleServiceProvider
    - `$schedule->job(CheckForDeadlines::class)->hourly()` - executed every hours
    - `$schedule->job(ActivateCourseJob::class)->daily()` - executed every days

Endpoints
---------

[](#endpoints)

All the endpoints are defined in [![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Courses/)

Tests
-----

[](#tests)

Run `./vendor/bin/phpunit  --filter 'EscolaLms\\Courses\\Tests'` to run tests. See [tests](tests) folder as it's quite good staring point as documentation appendix.

Events
------

[](#events)

- `EscolaLms\Courses\Events\CourseAccessFinished` =&gt; Event is dispatched when users lost access to course.
- `EscolaLms\Courses\Events\CourseAccessStarted` =&gt; Event is dispatched when users received access to course.
- `EscolaLms\Courses\Events\CourseAssigned` =&gt; Event is dispatched when admin assigned access user.
- `EscolaLms\Courses\Events\CourseDeadlineSoon` =&gt; Event is dispatched when course deadline is coming out.
- `EscolaLms\Courses\Events\CoursedPublished` =&gt; Event is dispatched when course is published.
- `EscolaLms\Courses\Events\CourseFinished` =&gt; Event is dispatched when course is ended.
- `EscolaLms\Courses\Events\CourseStarted` =&gt; Event is dispatched when course is started.
- `EscolaLms\Courses\Events\CourseStatusChanged` =&gt; Event is dispatched when course has a status change.
- `EscolaLms\Courses\Events\CourseTutorAssigned` =&gt; Event is dispatched when tutor is assigned to course.
- `EscolaLms\Courses\Events\CourseTutorUnassigned` =&gt; Event is dispatched when tutor is unassigned to course.
- `EscolaLms\Courses\Events\CourseUnassigned` =&gt; Event is dispatched when user is unassigned to course.
- `EscolaLms\Courses\Events\TopicFinished` =&gt; Event is dispatched when course topic is finished.

Permissions
-----------

[](#permissions)

Permissions are defined in [seeder](vendor/escolalms/courses/database/seeders/CoursesPermissionSeeder.php)

Model relation
--------------

[](#model-relation)

The model user must be extended with the class HasCourses :

```
class User extends EscolaLms\Core\Models\User
{
    use HasCourses;

```

Database relation
-----------------

[](#database-relation)

There is simple relation. [see docs for diagram](doc)

1. `Course` general category of the course
2. `Lesson` grouped by Course
3. `Topic` grouped by Lesson

```
Course 1 -> n Lesson
Lesson 1 -> n Topic
Topic 1 -> 1 TopicContent

```

`TopicContent` is an abstract model, this package contains some sample implementatio eg, `RichText`, `Audio`, `Video`, `H5P` and `Image`

You create any of the Content model by post to the same Topic endponit (create and update), [see docs examples](doc)

**Note** that `/api/topics` is using `form-data` - this is due to PHP nature of posting files

List of possible `TopicContent`s is availabe in the endpoint `/api/topics/types`

Curriculum/Sylabus/Program
--------------------------

[](#curriculumsylabusprogram)

App user access the course by fetching `GET /api/courses/{id}/program` endpoint. This is after user purchase or has other access to the course. this endpoints renders tree of Course, Lessons, Topic with Contents essential to render whole course.

Adding new `TopicContent` type
------------------------------

[](#adding-new-topiccontent-type)

In the ServiceProvider register your class like

```
use Illuminate\Support\ServiceProvider;
use EscolaLms\Courses\Facades\Topic;

class CustomServiceProvider extends ServiceProvider
{

    //...

    public function register()
    {
        Topic::registerContentClass(TopicContentCustom::class);
        // or
        Topic::registerContentClasses([TopicContentCustom::class, TopicAnotherContentCustom::class]);

        // also register JSON Resource for a type
        Topic::registerResourceClasses(Audio::class, [
            'client' => ClientAudioResource::class,
            'admin' => AdminAudioResource::class,
            'export' => ExportAudioResource::class,
        ]);

    }
}
```

see [EscolaLmsCourseServiceProvider.php](src/EscolaLmsCourseServiceProvider.php) as reference as well as [Models/TopicContent](package2/src/Models/TopicContent)

### Content

[](#content)

Package comes with seeder that create course with lessons and topics

```
php artisan db:seed --class="\EscolaLms\Courses\Database\Seeders\CoursesSeeder"
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance57

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~7 days

Recently: every ~77 days

Total

200

Last Release

283d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c857f3115c790c573d0617d7e9ba4011269ef7b9dfdb003dc4388846a62b14f7?d=identicon)[qunabu](/maintainers/qunabu)

---

Top Contributors

[![qunabu](https://avatars.githubusercontent.com/u/214608?v=4)](https://github.com/qunabu "qunabu (75 commits)")[![pa-cholek](https://avatars.githubusercontent.com/u/5345420?v=4)](https://github.com/pa-cholek "pa-cholek (75 commits)")[![HerbertIV](https://avatars.githubusercontent.com/u/62691459?v=4)](https://github.com/HerbertIV "HerbertIV (60 commits)")[![mako321](https://avatars.githubusercontent.com/u/59456825?v=4)](https://github.com/mako321 "mako321 (52 commits)")[![daVitekPL](https://avatars.githubusercontent.com/u/58150098?v=4)](https://github.com/daVitekPL "daVitekPL (25 commits)")[![dyfero](https://avatars.githubusercontent.com/u/59400506?v=4)](https://github.com/dyfero "dyfero (24 commits)")[![dicani0](https://avatars.githubusercontent.com/u/58490533?v=4)](https://github.com/dicani0 "dicani0 (9 commits)")[![victazzz](https://avatars.githubusercontent.com/u/24989821?v=4)](https://github.com/victazzz "victazzz (2 commits)")[![krzEscola](https://avatars.githubusercontent.com/u/85549830?v=4)](https://github.com/krzEscola "krzEscola (2 commits)")[![KrzysztofDziedziechEscolasoft](https://avatars.githubusercontent.com/u/96292232?v=4)](https://github.com/KrzysztofDziedziechEscolasoft "KrzysztofDziedziechEscolasoft (2 commits)")[![MWL91](https://avatars.githubusercontent.com/u/3055903?v=4)](https://github.com/MWL91 "MWL91 (2 commits)")[![ArtKob](https://avatars.githubusercontent.com/u/108077902?v=4)](https://github.com/ArtKob "ArtKob (1 commits)")

---

Tags

headlesslaravellms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/escolalms-courses/health.svg)

```
[![Health](https://phpackages.com/badges/escolalms-courses/health.svg)](https://phpackages.com/packages/escolalms-courses)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[escolalms/headless-h5p

Headless H5P Laravel REST API

2732.6k8](/packages/escolalms-headless-h5p)[escolalms/scorm

Escola LMS SCORM management

13124.9k7](/packages/escolalms-scorm)

PHPackages © 2026

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