Exemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategoriesSecond()
 {
     return $this->hasMany(ProjectCategoriesSecond::className(), ['project_id' => 'id']);
 }
Exemplo n.º 2
0
 private function getCategoriesListSecondIds($id)
 {
     $arr = [];
     $models = ProjectCategoriesSecond::find()->andWhere(['project_id' => $id])->all();
     foreach ($models as $model) {
         $arr[] = $model->category_id;
     }
     return $arr;
 }