⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
audiostanding.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(); } }); } }