vc text short

This commit is contained in:
andrey
2021-07-13 13:45:44 +03:00
parent fef3f26ae3
commit ca64e6741f
5 changed files with 39 additions and 2 deletions

View File

@ -60,14 +60,17 @@ class ProfileSearchForm extends Model
$model->joinWith(['skillValues']);
$this->skills = explode(',', $this->skills);
$model->where(['card_skill.skill_id' => $this->skills]);
$model->having('COUNT(DISTINCT skill_id) = ' . count($this->skills));
}
else{
$model->with('skillValues');
$model->joinWith('skillValues');
}
$model->andWhere(['status' => [4, 12]]);
$model->andWhere(['deleted_at' => null]);
$model->groupBy('card_skill.card_id');
return $model->limit($this->limit)
->offset($this->offset)->orderBy('id DESC')->asArray()->all();
}