first commit

This commit is contained in:
2026-05-22 20:46:29 +08:00
commit b04f87f2b0
121 changed files with 14851 additions and 0 deletions

33
app/Models/Question.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Question extends Model
{
protected $fillable = [
'section_id',
'question_text',
'type',
'allow_other_option',
'order',
];
protected $casts = [
'lain_lain' => 'boolean',
];
public function section()
{
return $this->belongsTo(Section::class);
}
public function options()
{
return $this->hasMany(Option::class);
}
public function answers()
{
return $this->hasMany(Answer::class);
}
}