From 237b161fe0fb724981b51550fe558e1721f3c0e8 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Sun, 29 Dec 2019 10:20:27 +0300 Subject: [PATCH] formatting --- app/Widgets/AccountBalance.php | 7 +------ app/Widgets/ExpensesByCategory.php | 2 +- app/Widgets/IncomeByCategory.php | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/Widgets/AccountBalance.php b/app/Widgets/AccountBalance.php index 2ba8fc09f..44fc1b9f4 100644 --- a/app/Widgets/AccountBalance.php +++ b/app/Widgets/AccountBalance.php @@ -7,13 +7,8 @@ use App\Models\Banking\Account; class AccountBalance extends Widget { - /** - * Treat this method as a controller action. - * Return view() or other content to display. - */ - public function run() + public function show() { - // $accounts = Account::enabled()->take(5)->get(); return view('widgets.account_balance', [ diff --git a/app/Widgets/ExpensesByCategory.php b/app/Widgets/ExpensesByCategory.php index 8efa023bf..e38fe0a70 100644 --- a/app/Widgets/ExpensesByCategory.php +++ b/app/Widgets/ExpensesByCategory.php @@ -13,7 +13,7 @@ class ExpensesByCategory extends Widget public function show() { - Category::with(['expense_transactions'])->type(['expense'])->enabled()->each(function ($category) { + Category::with('expense_transactions')->type('expense')->enabled()->each(function ($category) { $amount = 0; foreach ($category->expense_transactions as $transacion) { diff --git a/app/Widgets/IncomeByCategory.php b/app/Widgets/IncomeByCategory.php index 53a2a6f2d..2402b1246 100644 --- a/app/Widgets/IncomeByCategory.php +++ b/app/Widgets/IncomeByCategory.php @@ -13,7 +13,7 @@ class IncomeByCategory extends Widget public function show() { - Category::with(['income_transacions'])->type(['income'])->enabled()->each(function ($category) { + Category::with('income_transacions')->type('income')->enabled()->each(function ($category) { $amount = 0; foreach ($category->income_transacions as $transacion) {