LaravelQuiz is a simple Questions package.
Via Composer
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; // ... }
This package is open-sourced software licensed under the MIT license.