Example #1
0
 /**
  * @return User
  */
 public function getUser()
 {
     return self::hasOne(User::className(), ['id' => 'created_by']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUser()
 {
     return $this->hasOne(User::className(), ['id' => 'user_id']);
 }
 public function getOwner()
 {
     return $this->hasOne(User::className(), ['id' => 'created_by']);
 }