thienkimlove/laravel-h5p 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thienkimlove/laravel-h5p

Composer 安装命令:

composer require thienkimlove/laravel-h5p

包简介

H5P Plugin for laravel platform

README 文档

README

Description

Installation

Require it in the Composer.

composer require inhubdev/laravel-h5p

Publish the Views, Config and so things.

php artisan vendor:publish

Migrate the Database

php artisan migrate

Add to Composer-Classmap:

'classmap': [
    "vendor/h5p/h5p-core/h5p-default-storage.class.php",
    "vendor/h5p/h5p-core/h5p-development.class.php",
    "vendor/h5p/h5p-core/h5p-event-base.class.php",
    "vendor/h5p/h5p-core/h5p-file-storage.interface.php",
    "vendor/h5p/h5p-core/h5p.classes.php",
    "vendor/h5p/h5p-editor/h5peditor-ajax.class.php",
    "vendor/h5p/h5p-editor/h5peditor-ajax.interface.php",
    "vendor/h5p/h5p-editor/h5peditor-file.class.php",
    "vendor/h5p/h5p-editor/h5peditor-storage.interface.php",
    "vendor/h5p/h5p-editor/h5peditor.class.php"
],
'providers' => [
    InHub\LaravelH5p\LaravelH5pServiceProvider::class,
];

For linux

cd public/assets/vendor/h5p
ln -s ../../../../storage/h5p/content
ln -s ../../../../storage/h5p/editor
ln -s ../../../../storage/h5p/libraries

For windows

cd public\assets\vendor\h5p
mklink /d content ..\..\..\..\storage\h5p\content
mklink /d editor ..\..\..\..\storage\h5p\editor
mklink /d libraries ..\..\..\..\storage\h5p\libraries

You probably will need to add it to your app/Http/Middleware/VerifyCsrfToken.php due to H5P ajax requests without Laravel CSRF token:

protected $except = [
    '/ajax/library-upload',
    '/ajax/finish',
    '/ajax/content-user-data',
    '/ajax/library-install',
    '/ajax/files',
];

If your server runs on https, you will need to add it to your app/Providers/AppServiceProvider.php:

use Illuminate\Support\Facades\URL;

public function boot()
{
    /* ... */

    URL::forceScheme('https');
}

Credits

Abdelouahab Djoudi - Package creator.

Anass Boutakaoua - Laravel 7 support and base for this package.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 48
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-27