Added quiz features

This commit is contained in:
m.razaghi
2026-08-06 14:20:38 +03:30
parent af21c1c77e
commit 041a3e7bd5
12 changed files with 665 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class QuestionOption extends Model
{
use HasFactory;
protected $fillable = [
'question_id',
'option_text',
'is_correct',
];
protected $casts = [
'is_correct' => 'boolean',
];
public function question()
{
return $this->belongsTo(Question::class, 'question_id');
}
}