/** * @return \yii\db\ActiveQuery */ public function getCustomers() { return $this->hasMany(Customer::className(), ['id' => 'customer_id'])->viaTable('{{%entp_customer}}', ['entrepreneur_user_id' => 'user_id']); }
public function getCustomername() { return $this->hasOne(\common\models\Customer::className(), ['Cus_id' => 'customer']); }
/** * @return \yii\db\ActiveQuery */ public function getCustomer() { return $this->hasOne(Customer::className(), ['customer_id' => 'customer_id']); }
/** * @return \yii\db\ActiveQuery */ public function getCustomers() { return $this->hasMany(Customer::className(), ['id' => 'customer_id'])->via('reservations'); }