Expense category n+1 issue solved
This commit is contained in:
parent
f44da98cd9
commit
6641803ccd
@ -15,7 +15,7 @@ class ExpensesByCategory extends Widget
|
||||
|
||||
public function show()
|
||||
{
|
||||
Category::with('expense_transactions')->expense()->each(function ($category) {
|
||||
Category::with('expense_transactions')->expense()->withSubCategory()->getWithoutChildren()->each(function ($category) {
|
||||
$amount = 0;
|
||||
|
||||
$this->applyFilters($category->expense_transactions)->each(function ($transaction) use (&$amount) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user