Пример #1
0
 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;
     }
 }
Пример #2
0
function get_config($name)
{
    $model = \app\modules\core\models\Config::find(array('slug' => $name));
    return $model->body;
}