|
|
@@ -8,5 +8,12 @@ use Illuminate\Database\Eloquent\Model;
|
|
|
class PaliText extends Model
|
|
|
{
|
|
|
use HasFactory;
|
|
|
- protected $fillable = ['book','paragraph','level','class','toc','text','html','lenght'];
|
|
|
+ protected $fillable = ['book', 'paragraph', 'level', 'class', 'toc', 'text', 'html', 'lenght'];
|
|
|
+
|
|
|
+ public function progressChapters()
|
|
|
+ {
|
|
|
+ return $this->hasMany(ProgressChapter::class, null, null)
|
|
|
+ ->whereColumn('progress_chapters.book', 'pali_texts.book')
|
|
|
+ ->whereColumn('progress_chapters.para', 'pali_texts.paragraph');
|
|
|
+ }
|
|
|
}
|