{"repo":"Flowframe/laravel-trend","free":true,"listed":false,"github":"https://github.com/Flowframe/laravel-trend","clone":"git clone https://github.com/Flowframe/laravel-trend.git","description":"Generate trends for your models. Easily generate charts or reports.","language":"PHP","stars":1121,"topics":["laravel","trends","php","package","data","charts","reports","hacktoberfest"],"license":"MIT","category":"ui-components","readme_excerpt":"Laravel Trend Generate trends for your models. Easily generate charts or reports. Why? Most applications require charts or reports to be generated. Doing this over again, and again can be a painful process. That's why we've created a fluent Laravel package to solve this problem. You can aggregate average, min, max, and totals per minute, hour, day, month, and year. Installation You can install the package via composer: Usage To generate a trend for your model, import the Flowframe\\Trend\\Trend class and pass along a model or query. Example: Starting a trend You must either start a trend using ::model() or ::query() . The difference between the two is that using ::query() allows you to add additional filters, just like you're used to using eloquent. Using ::model() will just consume it as it is. Interval You can use the following aggregates intervals: - perMinute() - perHour() - perDay() - perMonth() - perYear() Aggregates You can use the following aggregates: - sum('column') - average('column') - max('column') - min('column') - count(' ') Date Column By default, laravel-trend assumes that the model on which the operation is being performed has a created at date column. If your model uses a different column name for the date or you want to use a different one, you should specify it using the dateColumn(string $column) method. Example: This allows you to work with models that have custom date column names or when you want to analyze data based on a different date column. Drivers","default_branch":null,"files":null,"tree":[],"storefront":"/r/Flowframe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Flowframe/laravel-trend/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}