コード例 #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]);
 }