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