PHPackages                             transisidev/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. transisidev/laravel-h5p

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

transisidev/laravel-h5p
=======================

H5P Plugin for Laravel platform - Updated for Laravel 12

v2.0.0(2d ago)03↑2900%MITPHPPHP ^8.2

Since May 25Pushed 2d agoCompare

[ Source](https://github.com/transisidev/laravel-h5p)[ Packagist](https://packagist.org/packages/transisidev/laravel-h5p)[ RSS](/packages/transisidev-laravel-h5p/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (3)Used By (0)

Laravel H5P
===========

[](#laravel-h5p)

H5P Plugin for Laravel platform - Updated for Laravel 12.

[![Laravel](https://camo.githubusercontent.com/b72e0aa3b09f6ee9f1cd47f19792a8204408312803c6b277768a5d2c99ffd60c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d7265642e737667)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/0f16581d1180dbfd4c0e13166ec1267d4ad2f2fab8281ea6d6b284cf5c65d921/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

✨ Features
----------

[](#-features)

- 📦 H5P Content Management (Create, Edit, Delete, Export, Embed)
- 📚 Library Management (Upload, Restrict, Clear Cache)
- 📊 Student Results Tracking
- 🔗 xAPI/LRS Integration (via queue jobs)
- 🌍 Multi-language Support (EN, AR, FR)
- ⬆️ Chunked File Upload Support (large video/file uploads)
- 🎨 Publishable Views &amp; Assets

📋 Requirements
--------------

[](#-requirements)

- PHP 8.2+
- Laravel 12.x
- PostgreSQL or MySQL
- `h5p/h5p-core: ^1.24`
- `h5p/h5p-editor: ^1.24`
- `guzzlehttp/guzzle: ^7.0`

🚀 Installation
--------------

[](#-installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require transisidev/laravel-h5p
```

### 2. Run Installation Command

[](#2-run-installation-command)

```
php artisan h5p:install
```

This will:

- Publish configuration files
- Run database migrations
- Create storage directories
- Link storage to public

### 3. Check Installation Status

[](#3-check-installation-status)

```
php artisan h5p:status
```

⚙️ Configuration
----------------

[](#️-configuration)

### Publish Config

[](#publish-config)

```
php artisan vendor:publish --tag=laravel-h5p-config
```

Config file: `config/laravel-h5p.php`

### Key Configuration Options

[](#key-configuration-options)

KeyDefaultDescription`language``en`Default language (`en`, `ar`, `fr`)`use_router``ALL`Route group to load: `ALL`, `EDITOR`, or `EXPORT``h5p_frame``true`Show H5P frame/toolbar`h5p_export``true`Allow content export`h5p_embed``true`Allow content embed`h5p_hub_is_enabled``true`Enable H5P Hub integration`h5p_save_content_state``false`Save user content state`h5p_save_content_frequency``30`State save frequency (seconds)`h5p_editor_max_post_size``128M`Max POST size for editor uploads`h5p_editor_chunk_upload_enabled``false`Enable chunked uploads`h5p_editor_chunk_threshold_bytes``5242880`Chunk upload threshold (5 MB)`h5p_editor_chunk_max_chunk_bytes``5242880`Max chunk size (5 MB)`h5p_editor_chunk_max_total_bytes``536870912`Max total upload size (512 MB)### Environment Variables

[](#environment-variables)

Add to your `.env`:

```
# H5P Chunked Upload (optional, for large files)
H5P_EDITOR_MAX_POST_SIZE=128M
H5P_EDITOR_CHUNK_UPLOAD_ENABLED=false
H5P_EDITOR_CHUNK_THRESHOLD_BYTES=5242880
H5P_EDITOR_CHUNK_MAX_CHUNK_BYTES=5242880
H5P_EDITOR_CHUNK_MAX_TOTAL_BYTES=536870912

# LRS/xAPI Integration (optional)
LRS_ENABLED=true
LRS_ENDPOINT=https://your-lrs.com/data/xAPI
LRS_USERNAME=your-key
LRS_PASSWORD=your-secret
```

📖 Available Commands
--------------------

[](#-available-commands)

CommandDescription`php artisan h5p:install`Full installation (publish config, run migrations, setup storage)`php artisan h5p:publish --force`Re-publish assets and config`php artisan h5p:cleanup --temp`Clean temporary files`php artisan h5p:cleanup --unused`Remove unused libraries`php artisan h5p:status`Show installation status`php artisan h5p:migrate`Run H5P database migrations manually`php artisan h5p:reset`Reset H5P data🔧 Usage
-------

[](#-usage)

### Publish Assets

[](#publish-assets)

```
# Publish all assets
php artisan vendor:publish --tag=laravel-h5p-assets

# Publish views
php artisan vendor:publish --tag=laravel-h5p-views

# Publish language files
php artisan vendor:publish --tag=laravel-h5p-lang

# Publish migrations
php artisan vendor:publish --tag=laravel-h5p-migrations
```

### Available Routes

[](#available-routes)

#### Editor &amp; Library Routes (`use_router = EDITOR` or `ALL`, requires auth)

[](#editor--library-routes-use_router--editor-or-all-requires-auth)

MethodRouteNameDescriptionGET`/h5p/library``h5p.library.index`List H5P librariesGET`/h5p/library/show/{id}``h5p.library.show`Show a libraryPOST`/h5p/library/store``h5p.library.store`Upload a libraryDELETE`/h5p/library/destroy``h5p.library.destroy`Delete a libraryGET`/h5p/library/restrict``h5p.library.restrict`Restrict a libraryPOST`/h5p/library/clear``h5p.library.clear`Clear library cacheGET/POST`/h5p``h5p.index`List H5P contentGET`/h5p/create``h5p.create`Create new contentPOST`/h5p``h5p.store`Store new contentGET`/h5p/{id}``h5p.show`Show contentGET`/h5p/{id}/edit``h5p.edit`Edit contentPUT`/h5p/{id}``h5p.update`Update contentDELETE`/h5p/{id}``h5p.destroy`Delete content#### Ajax Routes

[](#ajax-routes)

MethodRouteNameDescriptionGET/POST`/ajax/libraries``h5p.ajax.libraries`Get libraries listGET`/ajax/single-libraries``h5p.ajax.single-libraries`Get single libraryGET/POST`/ajax/content-type-cache``h5p.ajax.content-type-cache`Content type cacheGET/POST`/ajax/content-hub-metadata-cache``h5p.ajax.content-hub-metadata-cache`Hub metadata cachePOST`/ajax/library-install``h5p.ajax.library-install`Install libraryPOST`/ajax/library-upload``h5p.ajax.library-upload`Upload libraryPOST`/ajax/rebuild-cache``h5p.ajax.rebuild-cache`Rebuild asset cachePOST`/ajax/files``h5p.ajax.files`File uploadGET`/ajax/finish``h5p.ajax.finish`Finish actionPOST`/ajax/content-user-data``h5p.ajax.content-user-data`Save user dataPOST`/ajax/files/chunk``h5p.ajax.files.chunk`Chunked file uploadPOST`/ajax/files/chunk-assemble``h5p.ajax.files.chunk-assemble`Assemble chunks#### Export &amp; Embed Routes (always available)

[](#export--embed-routes-always-available)

MethodRouteNameDescriptionGET`/h5p/embed/{id}``h5p.embed`Embed H5P contentGET`/h5p/export/{id}``h5p.export`Download/export H5P content### Programmatic Usage

[](#programmatic-usage)

```
use Illuminate\Support\Facades\App;

// Get H5P instance
$h5p = App::make('LaravelH5p');

// Get content by ID
$content = $h5p->get_content($id);

// Get embed code
$embed = $h5p->get_embed($content, $settings);
// Returns: ['embed' => '...', 'settings' => [...]]

// Get editor settings
$settings = $h5p::get_editor();
```

### Facade Usage

[](#facade-usage)

```
use Transisi\LaravelH5P\Facades\LaravelH5p;

$content = LaravelH5p::get_content($id);
```

📦 Eloquent Models
-----------------

[](#-eloquent-models)

ModelNamespaceDescription`H5pContent``Transisi\LaravelH5P\Eloquents`H5P content entries`H5pLibrary``Transisi\LaravelH5P\Eloquents`Installed libraries`H5pResult``Transisi\LaravelH5P\Eloquents`Student results`H5pContentsLibrary``Transisi\LaravelH5P\Eloquents`Content-library pivot`H5pContentsTag``Transisi\LaravelH5P\Eloquents`Content tags`H5pContentsUserData``Transisi\LaravelH5P\Eloquents`User content state`H5pEventLog``Transisi\LaravelH5P\Eloquents`Event logs`H5pLibrariesHubCache``Transisi\LaravelH5P\Eloquents`H5P Hub cache```
use Transisi\LaravelH5P\Eloquents\H5pContent;
use Transisi\LaravelH5P\Eloquents\H5pResult;

// Get all content
$contents = H5pContent::all();

// Get content with results
$content = H5pContent::with('results')->find($id);

// Get results for a user
$results = H5pResult::where('user_id', $userId)->get();
```

🔗 xAPI/LRS Integration
----------------------

[](#-xapilrs-integration)

When LRS is enabled, student results can be sent to your LRS via queue jobs:

1. Set LRS credentials in `.env`
2. Dispatch the `SendXapiStatement` job after saving a result:

```
use App\Jobs\SendXapiStatement;

SendXapiStatement::dispatch($result);
```

3. Run queue worker:

```
php artisan queue:work
```

📁 Directory Structure
---------------------

[](#-directory-structure)

```
storage/app/public/h5p/
├── content/      # H5P content files
├── libraries/    # H5P libraries
└── temp/         # Temporary upload files

public/assets/vendor/
├── laravel-h5p/  # Package assets
├── h5p/h5p-core/ # H5P core JS/CSS/fonts/images
└── h5p/h5p-editor/ # H5P editor assets

resources/views/vendor/laravel-h5p/  # Published views

```

🌍 Multi-language Support
------------------------

[](#-multi-language-support)

Language files are available for:

- **English** (`en`)
- **Arabic** (`ar`)
- **French** (`fr`)

Set the default language in `config/laravel-h5p.php`:

```
'language' => 'en',
```

Or publish and customize translations:

```
php artisan vendor:publish --tag=laravel-h5p-lang
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please open an issue or submit a pull request.

📄 License
---------

[](#-license)

MIT License — see [LICENSE](LICENSE) file.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.9% 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 ~13 days

Total

2

Last Release

2d ago

Major Versions

v1.4.0 → v2.0.02026-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d53d9c418534519985e1ec8e10bc25eeabd7081a561dafffd27f853824aa03d?d=identicon)[transisidev](/maintainers/transisidev)

---

Top Contributors

[![EcoinTest](https://avatars.githubusercontent.com/u/153815470?v=4)](https://github.com/EcoinTest "EcoinTest (113 commits)")[![Aditya170700](https://avatars.githubusercontent.com/u/52729836?v=4)](https://github.com/Aditya170700 "Aditya170700 (7 commits)")[![SamehMohamedAhmedOmr](https://avatars.githubusercontent.com/u/17390615?v=4)](https://github.com/SamehMohamedAhmedOmr "SamehMohamedAhmedOmr (2 commits)")[![djoudi](https://avatars.githubusercontent.com/u/152725?v=4)](https://github.com/djoudi "djoudi (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.6M217](/packages/backpack-crud)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.6k69.4k](/packages/grumpydictator-firefly-iii)[unopim/unopim

UnoPim Laravel PIM

10.1k2.2k](/packages/unopim-unopim)[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

206923.1k10](/packages/backpack-basset)[firefly-iii/data-importer

Firefly III Data Import Tool.

7905.8k](/packages/firefly-iii-data-importer)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

98145.2k3](/packages/nickurt-laravel-akismet)

PHPackages © 2026

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