formatting
This commit is contained in:
parent
958ab027b5
commit
237b161fe0
@ -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', [
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user