Beispiel #1
0
 public static function boot()
 {
     parent::boot();
     Course::creating(function ($course) {
         $course->code = $course->generateCode();
     });
 }
Beispiel #2
0
 public static function boot()
 {
     parent::boot();
     QuizMember::deleting(function ($quiz_member) {
         $quiz_member->answers()->delete();
     });
 }
Beispiel #3
0
 public static function boot()
 {
     parent::boot();
     ExamMember::deleting(function ($exam_member) {
         $exam_member->answers()->delete();
     });
 }