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