コード例 #1
0
ファイル: UserMessages.php プロジェクト: Perihackaton/4
 public function getUser()
 {
     return $this->hasOne(User::className(), ['id' => 'user_id']);
 }
コード例 #2
0
ファイル: Claim.php プロジェクト: alexsynytskiy/Dynamomania
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCommentAuthor()
 {
     return $this->hasOne(User::className(), ['id' => 'comment_author']);
 }
コード例 #3
0
ファイル: Pages.php プロジェクト: alexandrSS/site.loc
 /**
  * @return Автор страницы.
  */
 public function getAuthor()
 {
     return $this->hasOne(User::className(), ['id' => 'author_id']);
 }