예제 #1
0
 public function getProducts()
 {
     return $this->hasMany(Product::className(), ['manufacturerId' => 'id']);
 }
예제 #2
0
 public function getProduct()
 {
     return $this->hasOne(Product::className(), ['categoryId' => 'id']);
 }