From cfd6261fd4bfe6cbb09f5d39caa01397ae60486f Mon Sep 17 00:00:00 2001 From: abiyasa05 Date: Thu, 29 May 2025 09:08:09 +0700 Subject: [PATCH] update: add column and relations for model literacy generated text --- .../app/Models/Literacy/LiteracyGeneratedText.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Penilaian Literasi/iClOP-V2/app/Models/Literacy/LiteracyGeneratedText.php b/Penilaian Literasi/iClOP-V2/app/Models/Literacy/LiteracyGeneratedText.php index 6e5b63a..215e44d 100644 --- a/Penilaian Literasi/iClOP-V2/app/Models/Literacy/LiteracyGeneratedText.php +++ b/Penilaian Literasi/iClOP-V2/app/Models/Literacy/LiteracyGeneratedText.php @@ -13,12 +13,21 @@ class LiteracyGeneratedText extends Model protected $fillable = [ 'user_id', + 'material_id', 'generate_text', + 'question_type', + 'question_count', + 'created_at', + 'updated_at' ]; public function teacher() { return $this->belongsTo(\App\Models\User::class, 'user_id'); } - + + public function material() + { + return $this->belongsTo(\App\Models\Literacy\LiteracyMaterial::class, 'material_id'); + } }