Пример #1
0
 /**
  * Construct a new model.
  */
 public function __construct()
 {
     $this->db = Database::load();
     $this->reset();
 }
 public function doEdit($data)
 {
     $rows = $this->model($data['params.model'])->updateById($data['params.id'], [$data['params.field'] => $data['post.value']]);
     echo json_encode(['success' => \PWS\Database::load()->error()[0] == '0000']);
 }