toArray(); } /** * @notes 保存装修配置 * @param $params * @return bool * @author 段誉 * @date 2022/9/15 9:37 */ public static function save($params) { $pageData = DecoratePage::where(['id' => $params['id']])->findOrEmpty(); if ($pageData->isEmpty()) { self::$error = '信息不存在'; return false; } DecoratePage::update([ 'id' => $params['id'], 'type' => $params['type'], 'data' => $params['data'], ]); return true; } }