34 lines
702 B
PHP
34 lines
702 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Latihan extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
// Tentukan tabel yang digunakan
|
|
protected $table = 'latihan';
|
|
|
|
// Tentukan kolom yang bisa diisi (Mass Assignment)
|
|
protected $fillable = [
|
|
'id_submateri',
|
|
'potongan_ayat',
|
|
'latin_text',
|
|
'materi_description',
|
|
'correct_audio',
|
|
'recorder_audio',
|
|
// 'feedback_pengajar',
|
|
// 'nilai',
|
|
// 'status',
|
|
];
|
|
|
|
public function progress()
|
|
{
|
|
return $this->hasMany(Progress::class, 'id_latihan'); // Relasi balik ke Progress
|
|
}
|
|
|
|
}
|