/** * @return \yii\db\ActiveQuery */ public function getBlog() { return $this->hasOne(Blog::className(), ['id' => 'blog_id']); }
public function getauthor() { // Customer has_many Order via Order.customer_id -> id return $this->hasMany(Blog::className(), ['author' => 'id']); }