aditya170700/laravel-h5p
最新稳定版本:v1.3.0
Composer 安装命令:
composer require aditya170700/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.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-08