예제 #1
0
파일: User.php 프로젝트: aoopvn/EduSec4.0.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]);
 }