diff --git a/backend/modules/card/models/UserCard.php b/backend/modules/card/models/UserCard.php index 6ffdef5..1cf853c 100755 --- a/backend/modules/card/models/UserCard.php +++ b/backend/modules/card/models/UserCard.php @@ -64,6 +64,12 @@ class UserCard extends \common\models\UserCard } } + public function beforeSave($insert) + { + $this->salary = str_replace(' ', '', \Yii::$app->request->post('UserCard')['salary']); + return parent::beforeSave($insert); // TODO: Change the autogenerated stub + } + public function afterSave($insert, $changedAttributes) { $post = \Yii::$app->request->post('UserCard'); diff --git a/console/controllers/SqlController.php b/console/controllers/SqlController.php new file mode 100644 index 0000000..2657a51 --- /dev/null +++ b/console/controllers/SqlController.php @@ -0,0 +1,17 @@ +db->createCommand($sql)->execute(); + } +} \ No newline at end of file