delete(); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::$error = $e->getMessage(); return false; } } /** * @notes 删除日志 * @param $params * @return bool * @author 段誉 * @date 2022/6/16 9:30 */ public static function deleteAll() { Db::startTrans(); try { OperationLog::where('create_time > 0')->delete(); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::$error = $e->getMessage(); return false; } } }