From edb4196252b7d3aed0fac8b68ebc56475309bb20 Mon Sep 17 00:00:00 2001 From: Arushad Ahmed Date: Thu, 1 Aug 2024 14:42:56 +0600 Subject: [PATCH] - Added docs for predefined stats --- docs/intro.md | 6 --- .../time-series/defining-time-series-stats.md | 45 +++++++++++++++++++ docs/time-series/predefined-stats.md | 38 ++++++++++++++++ 3 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 docs/time-series/predefined-stats.md diff --git a/docs/intro.md b/docs/intro.md index 9c1fd11..4ada207 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -5,10 +5,4 @@ sidebar_position: 1.0 # Stats -:::danger - -This package is currently under development. If anything works, that's a surprise. - -::: - [Stats](https://github.com/Javaabu/stats) Simplifies stats generation for Laravel. This package allows you to easily define time series statistics and visualize them through an interactive graph. diff --git a/docs/time-series/defining-time-series-stats.md b/docs/time-series/defining-time-series-stats.md index 7e49111..2a2c2ba 100644 --- a/docs/time-series/defining-time-series-stats.md +++ b/docs/time-series/defining-time-series-stats.md @@ -224,3 +224,48 @@ Instead of manually creating a sum stat class, you can use the provided `stats:t ```bash php artisan stats:time-series PaymentAmounts payment --type=sum ``` + +# Login Stats + +`LoginsRepository` is an abstract stat class that can be used to display login counts for a specific user type. This stat uses data from [`spatie/laravel-activitylog`](https://github.com/spatie/laravel-activitylog) to generate the results. So you will need the `spatie/laravel-activitylog` package to use this type of stats. + +```php + \App\Stats\TimeSeries\PaymentsCountRepository::class, + 'payments_amount' => \App\Stats\TimeSeries\PaymentsAmountRepository::class, + ], false); + } +} +```