formatting

This commit is contained in:
denisdulici 2019-12-29 10:20:27 +03:00
parent 958ab027b5
commit 237b161fe0
3 changed files with 3 additions and 8 deletions

View File

@ -7,13 +7,8 @@ use App\Models\Banking\Account;
class AccountBalance extends Widget class AccountBalance extends Widget
{ {
/** public function show()
* Treat this method as a controller action.
* Return view() or other content to display.
*/
public function run()
{ {
//
$accounts = Account::enabled()->take(5)->get(); $accounts = Account::enabled()->take(5)->get();
return view('widgets.account_balance', [ return view('widgets.account_balance', [

View File

@ -13,7 +13,7 @@ class ExpensesByCategory extends Widget
public function show() 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; $amount = 0;
foreach ($category->expense_transactions as $transacion) { foreach ($category->expense_transactions as $transacion) {

View File

@ -13,7 +13,7 @@ class IncomeByCategory extends Widget
public function show() 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; $amount = 0;
foreach ($category->income_transacions as $transacion) { foreach ($category->income_transacions as $transacion) {