/** * @return \yii\db\ActiveQuery */ public function getInvoices() { return $this->hasMany(Invoice::className(), ['id' => 'invoice_id'])->viaTable('{{%payment_dtl}}', ['payment_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getInvoice() { return $this->hasOne(Invoice::className(), ['id' => 'invoice_id']); }