public function actionDelete($id) { if ($_POST['action'] == 1) { $model = Config::find($id); $model->delete(); echo json_encode(array('id' => array($id), 'class' => 'alert-success', 'message' => __('delete config success'))); exit; } }
function get_config($name) { $model = \app\modules\core\models\Config::find(array('slug' => $name)); return $model->body; }