small_fixes

This commit is contained in:
SoHardKI 2019-07-03 16:17:20 +03:00
parent 3f48247569
commit 1a3a0aa5f8
2 changed files with 1 additions and 5 deletions

View File

@ -43,15 +43,12 @@ class UserCardController extends Controller
*/ */
public function actionIndex() public function actionIndex()
{ {
$status = new Status();
$searchModel = new UserCardSearch(); $searchModel = new UserCardSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
// $skills = CardSkill::find()->where(['card_id' => 'id'])->with('skill')->all();
return $this->render('index', [ return $this->render('index', [
'searchModel' => $searchModel, 'searchModel' => $searchModel,
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
// 'skills' => $skills,
]); ]);
} }
@ -109,7 +106,6 @@ class UserCardController extends Controller
public function actionUpdate($id) public function actionUpdate($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
// Debug::dd($model);
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]); return $this->redirect(['view', 'id' => $model->id]);
} }

View File

@ -79,7 +79,7 @@ class UserCardSearch extends UserCard
->andFilterWhere(['like', 'passport', $this->passport]) ->andFilterWhere(['like', 'passport', $this->passport])
->andFilterWhere(['like', 'photo', $this->photo]) ->andFilterWhere(['like', 'photo', $this->photo])
->andFilterWhere(['like', 'email', $this->email]); ->andFilterWhere(['like', 'email', $this->email]);
$query->andFilterWhere(['skill.id' => $this->skills]); $query->andFilterWhere(['skill.id' => $this->skills]);
return $dataProvider; return $dataProvider;