⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
tourismtrainingbd.urvam.com
/
app
/
Models
/
View File Name :
CourseChapterItem.php
hasOne(CourseChapterLesson::class, 'chapter_item_id', 'id'); } function chapter(): BelongsTo { return $this->belongsTo(CourseChapter::class, 'chapter_id', 'id'); } function quiz(): HasOne { return $this->hasOne(Quiz::class, 'chapter_item_id', 'id'); } function quizzes(): HasMany { return $this->hasMany(Quiz::class, 'chapter_item_id', 'id'); } /** * Boot method to handle model events. */ protected static function boot() { parent::boot(); static::deleting(function ($courseChapterItem) { $courseChapterItem->quizzes()->each(function ($quiz) { $quiz->delete(); }); if ($courseChapterItem->lesson) { $courseChapterItem->lesson->delete(); } if ($courseChapterItem->live) { $courseChapterItem->live->delete(); } }); } }