djoudi/laravel-h5p
Composer 安装命令:
composer require djoudi/laravel-h5p
包简介
H5P Plugin for Laravel platform - Updated for Laravel 12
README 文档
README
A comprehensive Laravel package for H5P interactive content with xAPI/LRS support.
✨ Features
- 📦 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)
📋 Requirements
- PHP 8.2+
- Laravel 11/12
- PostgreSQL/MySQL
🚀 Installation
1. Install via Composer
composer require djoudi/laravel-h5p
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
php artisan h5p:status
⚙️ Configuration
Environment Variables
Add 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
📖 Available Commands
| 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 |
🔧 Usage
Admin Routes
| Route | Description |
|---|---|
/h5p/library |
Manage H5P libraries |
/admin/h5p |
Manage H5P content |
/admin/reports |
View reports |
Student Routes
| Route | Description |
|---|---|
/lesson/{id} |
View H5P content |
Programmatic Usage
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);
🔗 xAPI/LRS Integration
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
📁 Directory Structure
storage/app/public/h5p/
├── content/ # H5P content files
├── libraries/ # H5P libraries
└── temp/ # Temporary files
🤝 Contributing
Contributions are welcome! Please read our contributing guidelines.
📄 License
MIT License - see LICENSE file.
djoudi/laravel-h5p 适用场景与选型建议
djoudi/laravel-h5p 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.43k 次下载、GitHub Stars 达 23, 最近一次更新时间为 2019 年 03 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 djoudi/laravel-h5p 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 djoudi/laravel-h5p 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-12