diff --git a/backend/modules/card/controllers/UserCardController.php b/backend/modules/card/controllers/UserCardController.php index c379f65..6ea86c5 100755 --- a/backend/modules/card/controllers/UserCardController.php +++ b/backend/modules/card/controllers/UserCardController.php @@ -43,15 +43,12 @@ class UserCardController extends Controller */ public function actionIndex() { - $status = new Status(); $searchModel = new UserCardSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); -// $skills = CardSkill::find()->where(['card_id' => 'id'])->with('skill')->all(); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, -// 'skills' => $skills, ]); } @@ -109,7 +106,6 @@ class UserCardController extends Controller public function actionUpdate($id) { $model = $this->findModel($id); -// Debug::dd($model); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } diff --git a/backend/modules/card/models/UserCardSearch.php b/backend/modules/card/models/UserCardSearch.php index 26d6e62..98f7a7c 100755 --- a/backend/modules/card/models/UserCardSearch.php +++ b/backend/modules/card/models/UserCardSearch.php @@ -79,7 +79,7 @@ class UserCardSearch extends UserCard ->andFilterWhere(['like', 'passport', $this->passport]) ->andFilterWhere(['like', 'photo', $this->photo]) ->andFilterWhere(['like', 'email', $this->email]); - + $query->andFilterWhere(['skill.id' => $this->skills]); return $dataProvider;