tsch / groupforcharts
A simple laravel package for grouping eloquent queries by month for chart use
1.0.0
2022-03-15 21:47 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^7.2
- laravel/framework: ^8.65
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Introduction
Group for charts generate an array sorted by months for the current year for your model.
Official Documentation
Installation
composer require tsch/groupforcharts
Once the tsch/groupforcharts package has been installed, you can use it whenever your want.
Examples
Grouping by month
use TSCH\GroupForCharts\GroupForCharts; GroupForCharts::groupByMonth($model) // Example result: [0, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 6]
License
Group for charts is open-sourced software licensed under the MIT license.