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()
{
$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]);
}

View File

@ -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;