Exemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getActivity()
 {
     return $this->hasOne(Activities::className(), ['id' => 'activity_id']);
 }
Exemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getActivities()
 {
     return $this->hasMany(Activities::className(), ['user_id' => 'id']);
 }