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