Git Product home page Git Product logo

laravel-charts's Introduction

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:

use LaravelDaily\LaravelCharts\Classes\LaravelChart;

// ...

$chart_options = [
    'chart_title' => 'Users by months',
    'report_type' => 'group_by_date',
    'model' => 'App\Models\User',
    'group_by_field' => 'created_at',
    'group_by_period' => 'month',
    'chart_type' => 'bar',
];
$chart1 = new LaravelChart($chart_options);

return view('home', compact('chart1'));

View File

@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Dashboard</div>

                <div class="card-body">

                    <h1>{{ $chart1->options['chart_title'] }}</h1>
                    {!! $chart1->renderHtml() !!}

                </div>

            </div>
        </div>
    </div>
</div>
@endsection

@section('javascript')
{!! $chart1->renderChartJsLibrary() !!}
{!! $chart1->renderJs() !!}
@endsection

Installation

composer require laraveldaily/laravel-charts

No additional configuration or other parameters yet.


Usage

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

$chart = new LaravelChart($options);

Then pass it to the View, as a variable:

return view('dashboard', compact('chart'));

Available Reports and Options

Currently package support three types of charts/reports:

  • group_by_date - amount of records from the same table, grouped by time period - day/week/month/year;
  • group_by_string - amount of records from the same table, grouped by any string field, like name;
  • group_by_relationship - amount of records from the same table, grouped by belongsTo relationship's field

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

Example with all options

$chart_options = [
    'chart_title' => 'Transactions by dates',
    'chart_type' => 'line',
    'report_type' => 'group_by_date',
    'model' => 'App\Models\Transaction',
    'conditions'            => [
        ['name' => 'Food', 'condition' => 'category_id = 1', 'color' => 'black', 'fill' => true],
        ['name' => 'Transport', 'condition' => 'category_id = 2', 'color' => 'blue', 'fill' => true],
    ],

    'group_by_field' => 'transaction_date',
    'group_by_period' => 'day',

    'aggregate_function' => 'sum',
    'aggregate_field' => 'amount',
    'aggregate_transform' => function($value) {
        return round($value / 100, 2);
    },
    
    'filter_field' => 'transaction_date',
    'filter_days' => 30, // show only transactions for last 30 days
    'filter_period' => 'week', // show only transactions for this week
    'continuous_time' => true, // show continuous timeline including dates without data
];
  • chart_title (required) - just a text title that will be shown as legend;
  • chart_type (required) - possible values: "line", "bar", "pie";
  • report_type (required) - see above, can be group_by_date, group_by_string or group_by_relationship;
  • model (required) - name of Eloquent model, where to take the data from;
  • name (optional) - just a text title that will be shown as title, otherwise the legend is used;
  • conditions (optional, only for line chart type) - array of conditions (name + raw condition + color) for multiple datasets;
  • group_by_field (required) - name of database field that will be used in group_by clause;
  • group_by_period (optional, only for group_by_date report type) - possible values are "day", "week", "month", "year";
  • relationship_name (optional, only for group_by_relationship report type) - the name of model's method that contains belongsTo relationship.
  • aggregate_function (optional) - you can view not only amount of records, but also their SUM() or AVG(). Possible values: "count" (default), "avg", "sum".
  • aggregate_field (optional) - see aggregate_function above, the name of the field to use in SUM() or AVG() functions. Irrelevant for COUNT().
  • aggregate_transform (optional) - callback function for additional transformation of aggregate number
  • filter_field (optional) - show only data filtered by that datetime field (see below)
  • filter_days (optional) - see filter_field above - show only last filter_days days of that field. Example, last 30 days by created_at field.
  • filter_period (optional) - another way to filter by field, show only record from last week / month / year. Possible values are "week", "month", "year".
  • continuous_time (optional) - show all dates on chart, including dates without data.
  • show_blank_data (optional) - show date even if the data is blank based on filter_days.
  • range_date_start (optional) - show data in from a date range by filter_field, this is the start date.
  • range_date_end (optional) - show data in from a date range by filter_field, this is the end date.
  • field_distinct (optional) - field name required, it will apply a distinct(fieldname)
  • style_class (optional) - add class css in canvas
  • date_format (optional) - add the date format, by default: American format Y-m-d
  • where_raw (optional) - Condition in multiple consultation situations
  • chart_height (optional) - add the height in options, default 300px
  • date_format_filter_days (optional) - add the date format for Filter days
  • withoutGlobalScopes (optional) - removes global scope restriction from queried model
  • with_trashed (optional) - includes soft deleted models
  • only_trashed (optional) - only displays soft deleted models
  • top_results (optional, integer) - limit number of results shown, see Issue #49
  • chart_color (optional, value in rgba, like "0,255,255") - defines the color of the chart
  • labels (optional, array with key and value) - defines key value array mapping old and new values
  • hidden (optional, boolean) hides the current dataset. Useful when having multiple datasets in one chart
  • stacked (optional, boolean, only for bar chart) stacks the chart data when dates or strings match instead of showing it next to eachother

Example with relationship

$chart_options = [
    'chart_title' => 'Transactions by user',
    'chart_type' => 'line',
    'report_type' => 'group_by_relationship',
    'model' => 'App\Models\Transaction',

    'relationship_name' => 'user', // represents function user() on Transaction model
    'group_by_field' => 'name', // users.name

    'aggregate_function' => 'sum',
    'aggregate_field' => 'amount',
    
    'filter_field' => 'transaction_date',
    'filter_days' => 30, // show only transactions for last 30 days
    'filter_period' => 'week', // show only transactions for this week
];

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:

{!! $chart1->renderHtml() !!}

It will generate something like this:

<canvas id="myChart"></canvas>

Action 2. Render JavaScript Library

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

{!! $chart1->renderChartJsLibrary() !!}

It will generate something like this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>

Action 3. Render JavaScript of Specific Chart

After Chart.js is loaded, launch this:

{!! $chart1->renderJs() !!}

Using Multiple Charts

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

Controller:

public function index()
{
    $chart_options = [
        'chart_title' => 'Users by months',
        'report_type' => 'group_by_date',
        'model' => 'App\Models\User',
        'group_by_field' => 'created_at',
        'group_by_period' => 'month',
        'chart_type' => 'bar',
        'filter_field' => 'created_at',
        'filter_days' => 30, // show only last 30 days
    ];

    $chart1 = new LaravelChart($chart_options);


    $chart_options = [
        'chart_title' => 'Users by names',
        'report_type' => 'group_by_string',
        'model' => 'App\Models\User',
        'group_by_field' => 'name',
        'chart_type' => 'pie',
        'filter_field' => 'created_at',
        'filter_period' => 'month', // show users only registered this month
    ];

    $chart2 = new LaravelChart($chart_options);

    $chart_options = [
        'chart_title' => 'Transactions by dates',
        'report_type' => 'group_by_date',
        'model' => 'App\Models\Transaction',
        'group_by_field' => 'transaction_date',
        'group_by_period' => 'day',
        'aggregate_function' => 'sum',
        'aggregate_field' => 'amount',
        'chart_type' => 'line',
    ];

    $chart3 = new LaravelChart($chart_options);

    return view('home', compact('chart1', 'chart2', 'chart3'));
}

View:

@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Dashboard</div>

                <div class="card-body">

                    <h1>{{ $chart1->options['chart_title'] }}</h1>
                    {!! $chart1->renderHtml() !!}

                <hr />

                    <h1>{{ $chart2->options['chart_title'] }}</h1>
                    {!! $chart2->renderHtml() !!}

                    <hr />

                    <h1>{{ $chart3->options['chart_title'] }}</h1>
                    {!! $chart3->renderHtml() !!}

                </div>

            </div>
        </div>
    </div>
</div>
@endsection

@section('javascript')
{!! $chart1->renderChartJsLibrary() !!}

{!! $chart1->renderJs() !!}
{!! $chart2->renderJs() !!}
{!! $chart3->renderJs() !!}
@endsection

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.

$settings1 = [
    'chart_title'           => 'Users',
    'chart_type'            => 'line',
    'report_type'           => 'group_by_date',
    'model'                 => 'App\Models\User',
    'group_by_field'        => 'created_at',
    'group_by_period'       => 'day',
    'aggregate_function'    => 'count',
    'filter_field'          => 'created_at',
    'filter_days'           => '30',
    'group_by_field_format' => 'Y-m-d H:i:s',
    'column_class'          => 'col-md-12',
    'entries_number'        => '5',
    'translation_key'       => 'user',
    'continuous_time'       => true,
];
$settings2 = [
    'chart_title'           => 'Projects',
    'chart_type'            => 'line',
    'report_type'           => 'group_by_date',
    'model'                 => 'App\Models\Project',
    // ... other values identical to $settings1
];

$chart1 = new LaravelChart($settings1, $settings2);

Multiple Datasets


License

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


More from our LaravelDaily Team

laravel-charts's People

Contributors

arjvand avatar devinnorgarb avatar dezv avatar itmobilitycontrol avatar jenga01 avatar karolisnarkevicius avatar krekas avatar kyaroslav avatar lakuapik avatar laraveldaily avatar mitulkoradiya avatar mixartemev avatar nathanaelgt avatar neppoz avatar oluwajubelo avatar piahdoneumann avatar povilaskorop avatar samuelmwangiw avatar shela avatar sonichandni avatar tommiekn avatar vinenzosoftware avatar zeevx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-charts's Issues

Date range not working

Chart still renders date range starting at first unfiltered record even when specifying filter_period, range_date_start and range_date_end.

$params = [
  "chart_title" => "Transactions"
  "report_type" => "group_by_date"
  "model" => "App\Models\Transaction",
  "conditions" => array: [
    0 => array: [
      "name" => "Amount"
      "condition" => "user_business_id = 13"
      "color" => "#42C5D2"
      "fill" => true
    ]
  ],
  "group_by_field" => "created_at"
  "group_by_period" => "day"
  "chart_type" => "line"
  "aggregate_function" => "sum"
  "aggregate_field" => "amount"
  "continuous_time" => true
  "filter_field" => "created_at"
  "filter_period" => "week"
  "range_date_start" => "2021-10-25"
  "range_date_end" => "2021-10-31"
]

$data['chart'] = new LaravelChart($params);

image

Column not found

The Condition on Line Charts does not seem to be working properly...

.. 'chart_type' => 'line', 'conditions' => [ ['name' => 'Condition 1', 'condition' => 'field = value', 'color' => 'black'], ['name' => 'Condition 2', 'condition' => 'field2 = value2', 'color' => 'blue'], ], ...
However the code is generating a error:

Column not found: 1054 Unknown column 'value' in 'where clause' (SQL: select * from tablewherecreated_at>= 2020-06-07 and field = value)

I am using the version 0.1.20 and the latest Laravel Version.

Please advise.

Optimization

Hello,
is there a way to optimize queries from this package?

Right now the query is "select * from table" and I guess that is not good because if someone is using this for bigger projects where there might be 10k users the application will use 50MB of ram and there will also be 10k models loaded and wait time will be about 3-5s.

We just need numbers of rows related to "created_at" or something like that we don't need all columns.

Change quotation mark to double for the condition

In LaravelChart.php line 53
[['name' => '', 'condition' => '', 'color' => '']];
change to
[['name' => '', 'condition' => "", 'color' => '']];

Because right it would accept only strings, I found it very useful when I can pass some variable data.

Line charts and conditions issue

Hi,

Line charts with multiple conditions should have all conditions to 0 on each day(or month or what so ever is selected) if theres no records for that conditions in the recordset.

Now this doesnt happen, if i do have 10 conditions, but the script can retrieve records only for 1, it doesnt show the other 9 with a "0 value", that should be the way it works i believe.

start date end date not working

this is my code .

[
            'chart_title' => 'Click Report by dates',
            'chart_type' => 'line',
            'report_type' => 'group_by_date',
            'model' => 'App\LinkClicks',
            'conditions'            => [
                ['name' => 'Link Clicks', 'condition' => 'publisher_post_id = ' . $this->post->id, 'color' => 'yellow', 'fill' => true],
            ],

            'group_by_field'   => 'created_at',
            'group_by_period'  => 'day',

            'filter_field'     =>   'created_at',
            'filter_days'      =>  30, // show only transactions for last 30 days
            'continuous_time'  => false,
            'range_date_start' => $start_date,
            'range_date_end'   => $end_date,
        ];

Thank you.

Group by field

Hi,

I am trying to create a chart that shows how many users are active in a log table, daily.

I have one table logs with an "user" column that refers to the user/id, trying to get the results like running a DISTINCT(user_id)

I was trying with something like this but it shows the total numbers of records for each day, not grouping it by user. (es. i have 100 transactions of 5 different users, now i get 100 but i would like to get 5).

Is it possible?

$chart_options_daily_users = [
            'chart_title' => 'Daily Users',
            'chart_type' => 'line',
            'report_type' => 'group_by_date',
            'model' => 'App\ApiLog',
            'conditions'            => [
                ['name' => 'Users', 'condition' => '', 'color' => 'red'],
            ],
            
            'relationship_name' => 'user',
            
            'group_by_field' => 'name',
            
            //'aggregate_function' => 'sum',
            //'aggregate_field' => 'user',

            'filter_field' => 'created_at',
            'filter_days' => 30, // show only transactions for last 30 days
            'filter_period' => 'month', // show only transactions for this week
            'continuous_time' => false, // show continuous timeline including dates without data
        ];

Select Colours on Pie charts

Is there away to customise / select specific colours for Pie Charts, currently it changes each time it is refreshed.

Shows only a single condition

Hi!

I'm not sure what's going wrong here.
My chart is loading properly but is only showing the bottom condition.

 $chartOptions = [
            'chart_title' => 'Transactions by dates',
            'chart_type' => 'line',
            'report_type' => 'group_by_date',
            'model' => 'App\Models\Transaction',
            'conditions' => [
                ['name' => 'Debit', 'condition' => "!credit", 'color' => 'red', 'fill' => false],
                ['name' => 'Credit', 'condition' => "credit", 'color' => 'green', 'fill' => false],
            ],
            'group_by_field' => 'date',
            'group_by_period' => 'day',
            'group_by_field_format' => 'Y-m-d',
            'aggregate_function' => 'sum',
            'aggregate_field' => 'amount',
        ];
        $chart = new LaravelChart($chartOptions);
        return view('home', compact('chart'));

Swapping the conditions will change the dataset from Credit to Debit and shows the new data in the chart with the corresponding color.

 'conditions' => [
                ['name' => 'Debit', 'condition' => "!credit", 'color' => 'red', 'fill' => false],
                ['name' => 'Credit', 'condition' => "credit", 'color' => 'green', 'fill' => false],
            ],

Changing the condition to another property doesn't work either.
Dye and dumping the chart object does always show a single dataset.

Quick Question

How do i dynamically update the options and rerender the chart with the new options?

unable to group_by_field with a field type date

i got some issue that said "Undefined index: group_by_field_format"
i use field from my table that has the field type date but it doesnt work, when i changed it to type datetime field (created_at) the chart is working. i also try to group it by period of month

continuous_time gives error

Hi,

If i enable continuous_time with a graph that works on a dataset with only the last 4 days set (its a log table) , it gives error:

"Invalid start date."
LaravelChart.php line 119

how to use join

i want to select my by this is my code
'where_raw' => 'transaction.id = (SELECT * FROM transactions INNER JOIN users ON users.id = transactions.payable_id)',

but did not return any data
pls how can i achieve this or correct code

Ajax

Is it possible to get the data in an ajax request?

Thank you for this package.

the chart is not rendering

the chart is not rendering, but when I use dd (chart_name) I see that the object has the data I need, I'm just not getting it to appear in the desired view.

Can anyone help me with this problem?

Using version
laraveldaily / laravel-charts ^ 0.1.25
laravel 8.12

Include SoftDelete

Hello,
I use SoftDelete on some Models.
How can I include this in my stats (to know the number of delete items) ?
Thanks !

Sampling data by value

Is it possible to make a selection of data by ID?

Purchases (user_id, amount, and etc)

How make chart only for user with ID = 1?

How to specify which column in model should be used as dataset?

I have a model with some columns. I want a certain column to be used as the dataset and another column to be used on the x-axis as labels. I got the x-axis labels to work but can't seem to specifiy which column should be used in the model for the dataset. It now seems to be using the 'id' column on my model, I want to use the 'value' column instead. Here's my code.

$options = [
            'chart_title' => 'Samplechart',
            'chart_type' => 'line',
            'model' => 'App\Models\Entry',
            'condition' => [
                ['name' => 'value', 'condition' => 'user_id = {Auth::user()->id}', 'color' => 'black', 'fill' => 'true'],
            ],
            'report_type' => 'group_by_date', 
            'group_by_field' => 'added_at',
            'group_by_period' => 'day',
            'group_by_field_format' => 'Y-m-d',
        ]; 

 $chart = new LaravelChart($options);

Can someone tell me where in the docs this is specified or is this feature not supported?

Thanks!

Relationship and also group by specific table

Currently I have the following options:

      $chart_options = [
        'chart_title' => 'Stats by dates',
        'chart_type' => 'bar',
        'report_type' => 'group_by_relationship',
        'model' => 'App\Operator',

        'relationship_name' => 'user',
        'group_by_field' => 'name',

        'filter_field' => 'completed_date',
        'filter_days' => 1,
        'filter_period' => 'week',
      ];

In date from model Operator I have a table item_clicked. I'd like to display
"where item_clicked == 'byname' ONLY and keep all the rest the same. Is there anyway to achieve custom queries for the data?

When the statistical target has only one piece of data, continuous_time doesn't work

I try to count the number of users in 30 days by day
But I found a problem
When there is only one user in 30 days, continuous_time doesn't work
When I add another user to the database with a different created_at, continuous_time works

php code

namespace App\Http\Controllers\Manager;

use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Http\Request;
use LaravelDaily\LaravelCharts\Classes\LaravelChart;

class StatisticsController extends Controller
{
    public function index(Request $request)
    {

        $user_register_count = [
            'all' => User::count(),
            '30'  => User::where([['created_at', '>=', date('Y-m-d H:i:s', time() - 2592000)]])->count(),
            '7'   => User::where([['created_at', '>=', date('Y-m-d H:i:s', time() - 604800)]])->count(),
            '1'   => User::where([['created_at', '>=', date('Y-m-d H:i:s', time() - 86400)]])->count(),
        ];

        $chart_options = [
            'chart_title'     => 'user register for month',
            'report_type'     => 'group_by_date',
            'model'           => User::class,
            'group_by_field'  => 'created_at',
            'group_by_period' => 'day',
            'chart_type'      => 'line',
            'filter_days'     => 30,
            'continuous_time' => true,
        ];
        $user_chart = new LaravelChart($chart_options);
        return view('manager.statistics.index', [
            'user_chart'          => $user_chart,
            'user_register_count' => $user_register_count,
        ]);

    }
}

html code

                <div class="chart">
                    {!! $user_chart->renderHtml() !!}
                </div>
    {!! $user_chart->renderChartJsLibrary() !!}
    {!! $user_chart->renderJs() !!}

image

Multiple Dataset in one chart ?

Hi !

I didn't see anything in your repo about multiple dataset, is this something that we can do with your package? If yes can you explain how to do it ?

Thank you for this and for your videos ! :)

Multiple records with same result doesnt show

Hi,

I have noticed that in a line graph, with multiple conditions, if two or more conditions have the same result number, only one shows in the graph while hover it.

I believe that if multiple conditions has the same result these shall be all listed in the hover tooltip of the chart.

Fails if imagick extension not installed

Just a heads up, spatie library requires imagick to run, including Dashboard & Reports on an application, this returns an error after GIT download to local machine running on Windoze.

Symfony\Component\Debug\Exception\FatalThrowableError
Class 'LaravelDaily\LaravelCharts\Classes\LaravelChart' not found

So, I attempt an install of that package...

Windows 10 WAMP

$ composer require laraveldaily/laravel-charts
Using version ^0.1.13 for laraveldaily/laravel-charts
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- spatie/pdf-to-image 1.8.2 requires ext-imagick * -> the requested PHP extension imagick is missing from your system.
- spatie/pdf-to-image 1.8.2 requires ext-imagick * -> the requested PHP extension imagick is missing from your system.
- Installation request for spatie/pdf-to-image (locked at 1.8.2) -> satisfiable by spatie/pdf-to-image[1.8.2].

Really is a WAMP issue on Windows, but just a note that these users will run into the issue. Suggest alternative chart support in future development. Recommend a user include a non-CRUD blank menu item/view to implement their own Dashboard etc.

How to assign a style class to the canvas?

<canvas id="{{ $options['chart_name'] ?? 'myChart' }}"></canvas>

it would be interesting to have a new attribute

<canvas id="{{ $options['chart_name'] ?? 'myChart' }}" class="{{ $options['class_name'] }}"></canvas>

group_by_field_format missing in documentation

Hi,

i initially struggled to to set the correct datetime format when grouping by a datetime field. So i noticed in LaravelChart the undocumented group_by_field_format

LaravelChart.php Line 106
$this->options['group_by_field_format'] ?? 'Y-m-d H:i:s',

Could be useful for those using CET time settings or those who have model mutators otherwise the query will fail.

A two digit month could not be found Data missing

image

In My Controller

        $registerChart = new LaravelChart([
            'chart_title'           => 'Users',
            'chart_type'            => 'line',
            'report_type'           => 'group_by_date',
            'model'                 => 'App\Models\User',
            'group_by_field'        => 'created_at',
            'group_by_period'       => 'day',
            'aggregate_function'    => 'count',
            'filter_field'          => 'created_at',
            'filter_days'           => '30',
            'group_by_field_format' => 'Y-m-d H:i:s',
            'column_class'          => 'col-md-12',
            'entries_number'        => '5',
            'translation_key'       => 'user',
            'continuous_time'       => true,
        ]);

In My Blade

{!! $registerChart->renderHtml() !!}
@section('script')
{!! $registerChart->renderChartJsLibrary() !!}
{!! $registerChart->renderJs() !!}
@endsection

Options to skip globalScode

When MultiTenantModel is used, then global scope is applied to the model.
However for displaying Charts in some cases I'd like to present data from all users.

SO implementing new option 'withoutGlobalScopes' could result in executing following query in LaravelCharts:
$collection = $query->withoutGlobalScopes()->get();

or - is there any other way to disable global scope?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.