コード例 #1
0
ファイル: Comment.php プロジェクト: bessonov87/bw
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUser()
 {
     return $this->hasOne(User::className(), ['id' => 'user_id'])->joinWith('profile');
 }
コード例 #2
0
ファイル: Files.php プロジェクト: bessonov87/bw
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUser()
 {
     return $this->hasOne(User::className(), ['id' => 'user_id']);
 }
コード例 #3
0
ファイル: Post.php プロジェクト: bessonov87/bw
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAuthor()
 {
     return $this->hasOne(User::className(), ['id' => 'author_id']);
 }