moirei / eloquent-metrics
Retrieve metric data on Eloquent Models for analytics.
0.3.0
2022-06-01 14:19 UTC
Requires
- php: ^7.2|^8.0
- cakephp/chronos: ^2.3
- illuminate/database: ^7.0|^8.0|^9.0
- illuminate/support: ^7.0|^8.0|^9.0
- laravel/helpers: ^1.5
Requires (Dev)
- orchestra/testbench: ^6.17
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-04-29 04:40:53 UTC
README
All documentation is available at the documentation site.
Example
... use MOIREI\Metrics\Trend; $metrics = Trend::make() ->name('Order Sales') ->period('week') // sample a week ago intil now ->add('previous-period') // add a comparison period ->sumByDays(\App\Models\Order::class, 'total');
Installation
composer require moirei/eloquent-metrics
Changelog
Please see CHANGELOG.
Credits
License
The MIT License (MIT). Please see License File for more information.