LaravelDaily / laravel-charts

Package to draw charts in Laravel with Chart.js
MIT License
532 stars 118 forks source link

Options to skip globalScode #51

Closed axplmma closed 3 years ago

axplmma commented 4 years ago

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?

PovilasKorop commented 4 years ago

@axplmma well, we created that package not only for QuickAdminPanel, but also for others to use in Laravel projects, so technically our package doesn't know anything about MultiTenant function or your global scopes.

But I understand it would be useful as a parameter somewhere.

Currently we don't have time to implement it, but if you make a Pull Request we would accept it. Thanks!