Download the PHP package laraveldaily/laravel-charts without Composer

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

Laravel Charts

Package to generate Chart.js charts directly from Laravel/Blade, without interacting with JavaScript.


Simple Usage

Laravel Charts - Users by Months

If you want to generate a chart above, grouping users records by the month of __created_at__ value, here's the code.

Controller:

View File


Installation

No additional configuration or other parameters yet.


Usage

You need to create LaravelChart object in your Controller, passing array of options.

Then pass it to the View, as a variable:


Available Reports and Options

Currently package support three types of charts/reports:

NOTE: From Laravel 8, all its models are placed in a folder called Models (App\Models)

Example with all options

Example with relationship


Rendering Charts in Blade

After you passed $chart variable, into Blade, you can render it, by doing three actions:

Action 1. Render HTML.

Wherever in your Blade, call this:

It will generate something like this:

Action 2. Render JavaScript Library

Package is using Chart.js library, so we need to initialize it somewhere in scripts section:

It will generate something like this:

Action 3. Render JavaScript of Specific Chart

After Chart.js is loaded, launch this:


Using Multiple Charts

You can show multiple charts on the same page, initialize them separately.

Controller:

View:

Laravel Charts - Users by Months

Laravel Charts - Users by Names

Laravel Charts - Transactions by Dates


Multiple Datasets

This is a new feature from v0.1.27. You can provide multiple arrays of settings to the LaravelChart constructor, and they will be drawn on the same chart.

Multiple Datasets


License

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


More from our LaravelDaily Team


All versions of laravel-charts with dependencies

PHP Build Version
Package Version
No informations.
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 laraveldaily/laravel-charts contains the following files

Loading the files please wait ....