/** * Return all Items by Category * @return Items */ public function getArticleItems() { return $this->hasMany(Items::className(), ['catid' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getItem() { return $this->hasOne(Items::className(), ['id' => 'itemid']); }