Code Monkey home page Code Monkey logo

laravel-h5p's Introduction

H5P Plugin for Laravel Framework

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.

laravel-h5p's People

Contributors

alefesouza avatar ciettv avatar ecointest avatar nguyenkain avatar samehmohamedahmedomr avatar soyamore avatar

Watchers

 avatar

Forkers

mgunesdev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.