/** * @return \yii\db\ActiveQuery */ public function getProductos() { return $this->hasMany(Productos::className(), ['idcategoria' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getIdproductos() { return $this->hasMany(Productos::className(), ['id' => 'idproducto'])->viaTable('producto_tienda', ['idcomercio' => 'id']); }