Download the PHP package jk-oster/laravel-collection-trend without Composer

On this page you can find all versions of the php package jk-oster/laravel-collection-trend. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-collection-trend

Collection Trend for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Generate trends from collections. Easily create charts or reports.

For detailed examples checkout the docs page.

Why?

Most applications require charts or reports to be generated. Doing this over again, and again can be a painful process. That's why I've created a fluent Laravel package to solve this problem (inspired by laravel-trend).

Installation & Setup

You can install this package with composer using the following command:

Usage

To generate a trend for your model, import the JkOster\CollectionTrend\CollectionTrend class and pass along a collectable.

Example:

Starting a trend

You can either start a trend using ::make() or ::collect().

Interval

You can use the following aggregates intervals:

Aggregates

You can use the following aggregates:

Date Column

By default, laravel-collection-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|Closure $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.

Value Column

By default laravel-collection-trend you have to specify the column that contains the values you want to aggregate in the aggregate method. Like the date column you can specify it using a string|Closure which you pass in the aggregate method.

Example:

Empty Data Fillers

By default laravel-collection-trend fills up missing data with the value 0. You can change this behavior by passing a int as second argument to the aggregate method.

Example:

Compatibility with Flowframe/Laravel-Trend

The interface of the package to the biggest part compatible with the Laravel-Trend package. You only need to exchange the calls with .

License

The MIT License (MIT). Please see License File for more information.

Credits

Thanks to the creators of flowframe/laravel-trend for inspiration.


All versions of laravel-collection-trend with dependencies

PHP Build Version
Package Version
Requires php Version ^8
illuminate/contracts Version ^10.0||^11.0
illuminate/support Version ^10||^11
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jk-oster/laravel-collection-trend contains the following files

Loading the files please wait ....