PHPackages                             thopd/h5p - 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. thopd/h5p

ActivePackage

thopd/h5p
=========

Independent Headless H5P Laravel REST API

0.0.8(7mo ago)048MITPHPPHP &gt;=7.4

Since Sep 24Pushed 7mo agoCompare

[ Source](https://github.com/thopd88/H5P)[ Packagist](https://packagist.org/packages/thopd/h5p)[ RSS](/packages/thopd-h5p/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (10)Used By (0)

Headless H5P Laravel API for Escola LMS ecosystem
=================================================

[](#headless-h5p-laravel-api-for-escola-lms-ecosystem)

[![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/H5P/)[![codecov](https://camo.githubusercontent.com/5df212b6ac26927ed6a7f5a7a3f3e18fdd7a60405e4eb5a279ada20c3a7eda03/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f4835502f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d63693456505162724f49)](https://codecov.io/gh/EscolaLMS/H5P)[![phpunit](https://github.com/EscolaLMS/H5P/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Core/actions/workflows/test.yml)[![downloads](https://camo.githubusercontent.com/23c47745278243e304eb44f94a52d7ec5120f87e523832c41057d3633ac4dfe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6573636f6c616c6d732f686561646c6573732d683570)](https://packagist.org/packages/escolalms/headless-h5p)[![downloads](https://camo.githubusercontent.com/41f0c785e09e924eef403d0a44897249e4660d5627a7d197d11d3dc59a817dd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573636f6c616c6d732f686561646c6573732d683570)](https://packagist.org/packages/escolalms/headless-h5p)[![downloads](https://camo.githubusercontent.com/6e45d3ca3e190c056a8478b47a74851adae5955494146a64f56b45288df01242/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573636f6c616c6d732f686561646c6573732d683570)](https://packagist.org/packages/escolalms/headless-h5p)[![Maintainability](https://camo.githubusercontent.com/bfbae8ce36fb1944bc665ac54397d8f34f83f1a8025bcec3d037fdde5907b3f3/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36333136653864633933613036643238633661302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/EscolaLMS/H5P/maintainability)

Before you begin
----------------

[](#before-you-begin)

This product is tightly coupled with the Escola LMS ecosystem and is not compatible with any other Laravel application.

Working demo
------------

[](#working-demo)

Proof of concept demo is available at .

Features
--------

[](#features)

All of the features are available thought REST API, there are no blade templates of using server side rendering H5PIntegration global js variable, this is a different approach then `moodle`, `drupal` and `wordpress` h5p plugins.

This package does provide only REST API access endpoints, this is so far only package that allows to render h5p headlessly.

The features includes:

- play all h5p content - exposed all essential data, yet player is needed
- edit all h5p content - exposed all essential data, yet editor is needed
- CRUD libraries
- CRUD content
- upload library from `.h5p` file
- upload content from `.h5p` file
- all the other h5p features like export etc

Documentation
-------------

[](#documentation)

See [Swagger](https://escolalms.github.io/H5P/) documented endpoints.

Some [tests](tests) can also be a great point of start.

To play the content you can use [EscolaLMS H5P Player](https://github.com/EscolaLMS/H5P-player)

Demo [React source files](https://github.com/EscolaLMS/h5p-laravel-demo/blob/main/resources/js/index.tsx), are great starting point for frontend tutorial

Install
-------

[](#install)

1. `composer require escolalms/headless-h5p`
2. `php artisan migrate`
3. `php artisan h5p:storage-link` see below
4. `php artisan db:seed --class="EscolaLms\HeadlessH5P\Database\Seeders\PermissionTableSeeder"` see below

### Storage links

[](#storage-links)

You need to publish many of files to be available as public link.

`php artisan h5p:storage-link` which creates a symbolic link from `storage/app/h5` and `vendor/h5p/h5p-core` and `vendor/h5p/h5p-editor` to be accessible to public, as follows

```
public_path('h5p') => storage_path('app/h5p'),
public_path('h5p-core') => base_path().'vendor/h5p/h5p-core',
public_path('h5p-editor') => base_path().'vendor/h5p/h5p-editor',

```

### Cors

[](#cors)

All the endpoints need to be accessible from other domains, so [CORS](https://laravel.com/docs/8.x/routing#cors) must be properly set.

Except of endpoints assets must expose CORS headers as well. You achieve that by setting `Apache/Nginx/Caddy/Whatever` settings - below is example for Nginx for wildcard global access.

```
location ~* \.(eot|ttf|woff|woff2|jpg|jpeg|gif|png|wav|mp3|mp4|mov|ogg|webv)$ {
    add_header Access-Control-Allow-Origin *;
}

```

### Authorization

[](#authorization)

Most of the endpoints require authorization, this is possible with Laravel passport

There is a [seeder](database/seeders/PermissionTableSeeder.php) to must be run in order to authorize

User model is taken from [Auth](https://github.com/EscolaLMS/Auth) package.

### Seeder

[](#seeder)

To seed content and library

```
php artisan db:seed --class="\EscolaLms\HeadlessH5P\Database\Seeders\ContentLibrarySeeder"

```

You can seed library and content with build-in seeders as command that are accessible with

- `php artisan h5p:seed` to add just libraries
- `php artisan h5p:seed --addContent` to add content with libraries

Road map
--------

[](#road-map)

- rewrite h5p core in a way like [luminare in typescript](https://github.com/lumieducation/lumi)

Running test locally
--------------------

[](#running-test-locally)

run `./test.sh`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance62

Regular maintenance activity

Popularity8

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor2

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

Total

8

Last Release

231d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/079ab2d0f264216dbab5ea79a2343a130af7c77720024272e6c99cc4173527b3?d=identicon)[thopd88](/maintainers/thopd88)

---

Top Contributors

[![qunabu](https://avatars.githubusercontent.com/u/214608?v=4)](https://github.com/qunabu "qunabu (83 commits)")[![dyfero](https://avatars.githubusercontent.com/u/59400506?v=4)](https://github.com/dyfero "dyfero (44 commits)")[![daVitekPL](https://avatars.githubusercontent.com/u/58150098?v=4)](https://github.com/daVitekPL "daVitekPL (32 commits)")[![KrzysztofDziedziechEscolasoft](https://avatars.githubusercontent.com/u/96292232?v=4)](https://github.com/KrzysztofDziedziechEscolasoft "KrzysztofDziedziechEscolasoft (21 commits)")[![thopd88](https://avatars.githubusercontent.com/u/20041501?v=4)](https://github.com/thopd88 "thopd88 (15 commits)")[![mako321](https://avatars.githubusercontent.com/u/59456825?v=4)](https://github.com/mako321 "mako321 (10 commits)")[![HerbertIV](https://avatars.githubusercontent.com/u/62691459?v=4)](https://github.com/HerbertIV "HerbertIV (5 commits)")[![krzEscola](https://avatars.githubusercontent.com/u/85549830?v=4)](https://github.com/krzEscola "krzEscola (3 commits)")[![YannikFirre](https://avatars.githubusercontent.com/u/3316758?v=4)](https://github.com/YannikFirre "YannikFirre (1 commits)")[![dicani0](https://avatars.githubusercontent.com/u/58490533?v=4)](https://github.com/dicani0 "dicani0 (1 commits)")[![hareom284](https://avatars.githubusercontent.com/u/64596861?v=4)](https://github.com/hareom284 "hareom284 (1 commits)")[![pa-cholek](https://avatars.githubusercontent.com/u/5345420?v=4)](https://github.com/pa-cholek "pa-cholek (1 commits)")[![tarreislam](https://avatars.githubusercontent.com/u/9095570?v=4)](https://github.com/tarreislam "tarreislam (1 commits)")[![ArtKob](https://avatars.githubusercontent.com/u/108077902?v=4)](https://github.com/ArtKob "ArtKob (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thopd-h5p/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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