示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNotices()
 {
     return $this->hasMany(Notice::className(), ['updated_by' => 'user_id']);
 }
示例#2
0
文件: User.php 项目: 0ps/simpleforum
 public function getNotices()
 {
     return $this->hasMany(Notice::className(), ['target_id' => 'id'])->where(['status' => 0])->orderBy(['updated_at' => SORT_DESC]);
 }