webbingbrasil / laravel-quiz
A basic quiz implementation for laravel.
This package's canonical repository appears to be gone and the package has been frozen as a result.
1.0.0
2018-08-31 18:38 UTC
Requires
- php: >=5.6.4|^7.0
- illuminate/database: >=5.3
- illuminate/support: >=5.3
This package is auto-updated.
Last update: 2022-01-26 19:58:54 UTC
README
A basic quiz implementation for laravel
Installation
Install package via composer
composer require "webbingbrasil/laravel-quiz=1.0.0"
Next, if you are using Laravel prior to 5.5, register the service provider in the providers array of your config/app.php configuration file:
WebbingBrasil\Quiz\Providers\QuizServiceProvider::class,
To get started, you'll need to publish the vendor assets and migrate:
php artisan vendor:publish --provider="WebbingBrasil\Quiz\Providers\QuizServiceProvider" && php artisan migrate
Usage
Add our CanAnswerQuiz
trait to your model.
<?php namespace App\Models; use WebbingBrasil\Quiz\Traits\CanAnswerQuiz; class User extends Model { use CanAnswerQuiz; // ... } ?>