A comprehensive Laravel package for H5P interactive content with xAPI/LRS support.
- 📦 H5P Content Management (Create, Edit, Delete)
- 📚 Library Management
- 📊 Student Results Tracking
- 🔗 xAPI/LRS Integration
- 📈 Reports & Analytics
- 🎨 Tailwind CSS Admin Interface
- 🌍 Multi-language Support (EN, AR, FR)
- PHP 8.2+
- Laravel 11/12
- PostgreSQL/MySQL
composer require djoudi/laravel-h5pphp artisan h5p:installThis will:
- Publish configuration files
- Run database migrations
- Create storage directories
- Link storage to public
php artisan h5p:statusAdd to your .env:
# H5P Settings
H5P_STORAGE_PATH=h5p
# LRS/xAPI Integration (Optional)
LRS_ENABLED=true
LRS_ENDPOINT=https://your-lrs.com/data/xAPI
LRS_USERNAME=your-key
LRS_PASSWORD=your-secret| Command | Description |
|---|---|
php artisan h5p:install |
Full installation with migrations |
php artisan h5p:publish --force |
Republish 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 |
| Route | Description |
|---|---|
/h5p/library |
Manage H5P libraries |
/admin/h5p |
Manage H5P content |
/admin/reports |
View reports |
| Route | Description |
|---|---|
/lesson/{id} |
View H5P content |
use Illuminate\Support\Facades\App;
// Get H5P instance
$h5p = App::make('LaravelH5p');
// Get content
$content = $h5p->get_content($id);
// Get embed code
$embed = $h5p->get_embed($content, $settings);When LRS is enabled, student results are automatically sent to your LRS:
- Set
LRS_ENABLED=truein.env - Configure LRS credentials
- Run queue worker:
php artisan queue:work
storage/app/public/h5p/
├── content/ # H5P content files
├── libraries/ # H5P libraries
└── temp/ # Temporary files
Contributions are welcome! Please read our contributing guidelines.
MIT License - see LICENSE file.