From 0d113a60fd7d04cf6a0e44f682351205feaac814 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 7 Jul 2021 16:30:01 +0300 Subject: [PATCH] fix search profile --- frontend/modules/api/models/ProfileSearchForm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/modules/api/models/ProfileSearchForm.php b/frontend/modules/api/models/ProfileSearchForm.php index ec782ba..e566b73 100644 --- a/frontend/modules/api/models/ProfileSearchForm.php +++ b/frontend/modules/api/models/ProfileSearchForm.php @@ -65,8 +65,10 @@ class ProfileSearchForm extends Model $model->with('skillValues'); } + $model->andWhere(['status' => [4, 12]]); + return $model->limit($this->limit) - ->offset($this->offset)->asArray()->all(); + ->offset($this->offset)->orderBy('id DESC')->asArray()->all(); } } \ No newline at end of file