예제 #1
0
 private function getCategoriesListIds($id)
 {
     $arr = [];
     $models = ProjectCategories::find()->andWhere(['project_id' => $id])->all();
     foreach ($models as $model) {
         $arr[] = $model->category_id;
     }
     return $arr;
 }
예제 #2
0
파일: Project.php 프로젝트: aivavic/auction
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategories()
 {
     return $this->hasMany(ProjectCategories::className(), ['project_id' => 'id']);
 }