Download the PHP package mohammad-zarifiyan/laravel-chart without Composer

On this page you can find all versions of the php package mohammad-zarifiyan/laravel-chart. 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-chart

Laravel Chart

This Laravel package helps you to export data for charts using Eloquent ORM easily.

Installation

To install package, just run the following command in the root of your project:

Implementation

First you need to give trait MohammadZarifiyan\LaravelChart\Traits\HasChart to your model. Then use the exportForChart method to extract the data.

  1. The first parameter of this method must be an instance of Carbon\CarbonPeriod that specifies the beginning and end of the total time period.
  2. The second parameter of this method must be a closure that its first parameter is an instance of Illuminate\Database\Eloquent\Builder and its second parameter is an instance of Carbon\CarbonPeriod. In this closure, you must apply conditions to the Illuminate\Database\Eloquent\Builder that limit the data to the time period given by Carbon\CarbonPeriod and then return the desired data for your chart.

The result of exportForChart method is an instance of Illuminate\Support\Collection that includes the data you returned in the closure, so you can use them in your charts.

Example

In the following example, we have calculated the sum of the amount column of the invoices at the end of each day in the period of one week ago until now.

Above code output will be something like this:

You can also filter the table data based on a column in a relation. In the example below, we get the sum of the invoices amount based on their payment time.


All versions of laravel-chart with dependencies

PHP Build Version
Package Version
Requires php Version ^8
laravel/framework Version >=7
ext-curl Version *
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 mohammad-zarifiyan/laravel-chart contains the following files

Loading the files please wait ....