예제 #1
0
파일: Categorias.php 프로젝트: no7kpo/denm
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductos()
 {
     return $this->hasMany(Productos::className(), ['idcategoria' => 'id']);
 }
예제 #2
0
파일: Comercios.php 프로젝트: no7kpo/denm
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdproductos()
 {
     return $this->hasMany(Productos::className(), ['id' => 'idproducto'])->viaTable('producto_tienda', ['idcomercio' => 'id']);
 }