OctoberCMS - Update a field in a related table when inserting
问题 In OctoberCMS, I have three tables: Students, Courses and Subscriptions (studentID, courseID, active) When student subscribes to a course, it's not activated until the admin activate it. That is logical. But When admin opens a course form from backend, he can select students to subscribe in this course, then they are added to subscriptions table. Here I would like to update the field: active automatically. How can I dot that? I wrote this code, but it didn't work: public function afterSave()