public function beforeSave($insert) { if (parent::beforeSave($insert)) { $params_ = ['players_slots' => $this->players_slots, 'scores_on_rate' => $this->scores_on_rate]; $this->params = json_encode($params_); return true; } else { return false; } }
public function beforeSave($insert) { if (parent::beforeSave($insert)) { $params_ = ['ratio_kills' => $this->ratio_kills, 'ratio_deaths' => $this->ratio_deaths, 'ratio_assists' => $this->ratio_assists, 'ratio_gold_per_min' => $this->ratio_gold_per_min, 'ratio_xp_per_min' => $this->ratio_xp_per_min, 'scores_per_pick' => $this->scores_per_pick, 'scores_per_ban' => $this->scores_per_ban, 'scores_on_rate' => $this->scores_on_rate, 'pd_players_slots' => $this->pd_players_slots, 'hd_heroes_slots' => $this->hd_heroes_slots, 'md_players_slots' => $this->md_players_slots, 'md_heroes_slots' => $this->md_heroes_slots]; $this->params = json_encode($params_); return true; } else { return false; } }