tsch/groupforcharts

A simple laravel package for grouping eloquent queries by month for chart use

1.0.0 2022-03-15 21:47 UTC

This package is auto-updated.

Last update: 2025-07-16 05:24:44 UTC


README

Total Downloads Latest Stable Version License

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.