/** * @return \yii\db\ActiveQuery */ public function getCourseRatings() { return $this->hasMany(CourseRating::className(), ['user_id' => 'id']); }