From 61fdd302da9d614ffd9ea3f0988c22c23cca9b10 Mon Sep 17 00:00:00 2001 From: eliseekn Date: Fri, 19 Apr 2024 12:08:55 +0000 Subject: [PATCH] Rebase branch 2.9.0-beta-1 onto 2.x Update README.md Update CHANGELOG.md --- .idea/laravel-idea.xml | 1 - CHANGELOG.md | 4 ++++ README.md | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.idea/laravel-idea.xml b/.idea/laravel-idea.xml index 793d126..3b7a51e 100644 --- a/.idea/laravel-idea.xml +++ b/.idea/laravel-idea.xml @@ -2,6 +2,5 @@ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d15f3e5..39ba228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-metrics` will be documented in this file +## 2.9.2 + +- Rebase branch 2.9.0-beta-1 onto 2.x + ## 2.9.2-beta-2 - Add metricsWithVariations method diff --git a/README.md b/README.md index 54d106b..c9f1b71 100644 --- a/README.md +++ b/README.md @@ -169,12 +169,13 @@ LaravelMetrics::query(...) ```php LaravelMetrics::query(...) ->trends(bool $inPercent = false) //or - ->metrics(?int $withVariationsCount = null) + ->metrics() //or + ->metricsWithVariations(int $previousCount, string $previousPeriod, bool $inPercent = false) ``` -***Note 1 :*** The `trends` method can generate data in percentage format when the `$inPercent` parameter is set to `true`. On the other hand, the `metrics` method can generate variations from the past day, week, month, or year based on the period specified. You can use the `$withVariationsCount` to specify the count for past period. +***Note 1 :*** The `trends` method can generate data in percentage format when the `$inPercent` parameter is set to `true`. -***Note 2 :*** `$withVariationsCount` should only be used on `day`, `week`, `month`, or `year` period. +***Note 2 :*** The `metricsWithVariations` method generates metrics with variations from the `$previousPeriod` period (`day`, `week`, `month`, or `year`). The `$previousCount` parameter specifies the count for the past period. Set `$inPercent` parameter to true to get variations result in percent. ### Combining periods and aggregates Combining different time periods and data aggregates can enhance your overall experience. For example :