leobeal/laravel-quiz

A simple Laravel Quiz package

1.0.3 2018-05-23 21:24 UTC

This package is auto-updated.

Last update: 2024-11-26 05:22:46 UTC


README

Latest Version on Packagist Total Downloads Build Status StyleCI

LaravelQuiz is a simple Questions package.

Installation

Via Composer

Instalation

composer require leobeal/laravel-quiz

You can publish the config with:

php artisan vendor:publish --provider="Leobeal\LaravelQuiz\QuizServiceProvider"

Change config/quiz.php according to your needs.

  • The migrations won't be published and will be executed from the vendor folder.

After changing the config, run the migrations

php artisan migrate

Add the Quizzable Trait to your model

use Illuminate\Database\Eloquent\Model;
use Leobeal\LaravelQuiz\Model\Quizzable;

class Course extends Model
{
   use Quizzable;

   // ...
}

License

This package is open-sourced software licensed under the MIT license.