generated from Javaabu/package-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Predefined stats | ||
sidebar_position: 7 | ||
--- | ||
|
||
This package ships with several different predefined stats that might be useful. | ||
|
||
# Available Predefined Stats | ||
|
||
## user_signups | ||
|
||
Shows the counts for `App\Model\User` signups. | ||
|
||
## user_logins | ||
|
||
Shows the login counts for `App\Model\User`. Enabled only if `spatie/laravel-activitylog` package is installed. | ||
|
||
# Hiding Predefined Stats | ||
|
||
If you want to hide the predefined stats from the stats page, you can set the `merge` option to `false` when registering your stats. | ||
|
||
```php | ||
use \Javaabu\Stats\TimeSeriesStats; | ||
|
||
class AppServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Bootstrap any application services. | ||
*/ | ||
public function boot(): void | ||
{ | ||
TimeSeriesStats::register([ | ||
'payments_count' => \App\Stats\TimeSeries\PaymentsCountRepository::class, | ||
'payments_amount' => \App\Stats\TimeSeries\PaymentsAmountRepository::class, | ||
], false); | ||
} | ||
} | ||
``` |