コード例 #1
0
ファイル: Product.php プロジェクト: portalsway2/APEDevices
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContents()
 {
     return $this->hasMany(Content::className(), ['product_id' => 'id']);
 }
コード例 #2
0
ファイル: User.php プロジェクト: portalsway2/APEDevices
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContentDevices()
 {
     return $this->hasMany(Content::className(), ['owner_id' => 'id']);
 }