PHP code example of leobeal / laravel-quiz

1. Go to this page and download the library: Download leobeal/laravel-quiz library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

leobeal / laravel-quiz example snippets


>use Illuminate\Database\Eloquent\Model;
>use Leobeal\LaravelQuiz\Model\Quizzable;
>
>class Course extends Model
>{
>    use Quizzable;
>
>    // ...
>}
>
bash
php artisan vendor:publish --provider="Leobeal\LaravelQuiz\QuizServiceProvider"
bash
php artisan migrate