/** * @throws Exception */ public function up() { $json = []; $params = $_GET; foreach ($params as $key => $val) { $this->settings->set($key, $this->clearValue($val)); } $this->settings->flush(); $json['message'] = 'Настройки сохранены'; echo json_encode($json); }