public function getAuthor()
 {
     return $this->hasOne(User::className(), ['id' => 'id_user']);
 }
示例#2
0
文件: Topic.php 项目: Ramengel/yii_fl
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAuthor0()
 {
     return $this->hasOne(User::className(), ['id' => 'author_id']);
 }