From 1a3a0aa5f86ca9fd472feec03f8bfb93c5de3693 Mon Sep 17 00:00:00 2001 From: SoHardKI Date: Wed, 3 Jul 2019 16:17:20 +0300 Subject: [PATCH] small_fixes --- backend/modules/card/controllers/UserCardController.php | 4 ---- backend/modules/card/models/UserCardSearch.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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;