allowField(true)->save($data); } /** * 编辑记录 * @param $data * @return bool|int */ public function edit($data) { $data['printer_config'] = $data[$data['printer_type']]; return $this->allowField(true)->save($data); } /** * 删除记录 * @return bool|int */ public function setDelete() { return $this->save(['is_delete' => 1]); } }