Initial commit

This commit is contained in:
Richard Jolley committed 2026-01-14 00:54:08 +00:00
commit c909d539bc
7178 files changed
+756624

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Lesson extends Model
{
protected $fillable = ['chapter_id','lesson_section_id','title','description','order', 'slug'];
//protected $fillable = ['lesson_section_id', 'title', 'description', 'video_url', 'order'];
public function lessonSection()
{
return $this->belongsTo(LessonSection::class);
}
public function chapter()
{
return $this->belongsTo(Chapter::class);
}
public function videos()
{
return $this->hasMany(LessonVideo::class)->orderBy('order');
}
public function progress()
{
return $this->hasMany(LessonProgress::class);
}
public function questions()
{
return $this->hasMany(LessonQuestion::class);
}
}