hasOne(UserModel::class, 'id', 'user_id'); } public function course() { return $this->hasOne(UniversityCourseModel::class, 'id', 'course_id'); } public function chapters() { return $this->hasMany(UniversityCourseChapterModel::class, 'course_id', 'course_id'); } }