Skip to content

Commit

Permalink
Merge pull request #2 from eliseekn/v1.0.1
Browse files Browse the repository at this point in the history
feat: added carbon package
  • Loading branch information
eliseekn authored Sep 25, 2021
2 parents cccfc3e + c92cb4a commit 14b5ec9
Show file tree
Hide file tree
Showing 7 changed files with 3,129 additions and 89 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ composer require eliseekn/laravel-metrics
## Usage

```php
//generate user count trends for your chart
$userTrends = LaravelMetrics::getTrends('users', 'id', LaravelMetrics::YEAR, LaravelMetrics::COUNT);
$userMetrics = LaravelMetrics::getMetrics('users', 'expenses', LaravelMetrics::TODAY, LaravelMetrics::SUM);

//track expenses for a specific period
$expensesMetrics = LaravelMetrics::getMetrics('expenses', 'amount', LaravelMetrics::QUATER_YEAR, LaravelMetrics::SUM);
```

### Testing
Expand Down
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"minimum-stability": "dev",
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^8.0"
"illuminate/support": "^8.0",
"nesbot/carbon": "2.x-dev"
},
"require-dev": {
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
Expand All @@ -37,18 +37,13 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

"test": "vendor/bin/phpunit"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Eliseekn\\LaravelMetrics\\LaravelMetricsServiceProvider"
],
"aliases": {
"LaravelMetrics": "Eliseekn\\LaravelMetrics\\LaravelMetricsFacade"
}
Expand Down
Loading

0 comments on commit 14b5ec9

Please sign in to comment.