/** * Remove all students */ public function removeTeachers() { TeacherStudent::deleteAll(['student_id' => $this->id]); }
/** * Remove all students */ public function removeStudents() { TeacherStudent::deleteAll(['teacher_id' => $this->id]); }