Beispiel #1
0
 public function actionIndex()
 {
     //return $this->render('index');
     $model = Invoice::findOne(1);
     echo 'fdsaf';
     echo "<pre>";
     print_r(Invoice::className());
     echo "</pre>";
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getInvoices()
 {
     return $this->hasMany(Invoice::className(), ['customer_id' => 'id']);
 }
Beispiel #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getInvoices()
 {
     return $this->hasMany(Invoice::className(), ['id' => 'invoice_id'])->viaTable('invoices_items', ['item_id' => 'id']);
 }