public static function boot()
 {
     parent::boot();
     static::saved(function ($classes) {
         self::$lastClassesId = $classes->classes_id;
     });
     // 將導師的班級資料設定為0,刪除排課設定
     static::deleting(function ($classes) {
         $teacher = Teacher::where('classes_id', '=', $classes->classes_id)->update(array('classes_id' => 0));
         $courseUnit = Courseunit::where('classes_id', '=', $classes->classes_id)->delete();
     });
 }