revers relation changes..

This commit is contained in:
Cüneyt Şentürk 2023-05-31 14:40:05 +03:00
parent 94dda670e6
commit 9c5a4f9d12
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class Accounts extends Controller
*/ */
public function index() public function index()
{ {
$accounts = Account::with('transactions')->collect(); $accounts = Account::with('income_transactions', 'expense_transactions')->collect();
return $this->response('banking.accounts.index', compact('accounts')); return $this->response('banking.accounts.index', compact('accounts'));
} }

View File

@ -15,7 +15,7 @@ class AccountBalance extends Widget
public function show() public function show()
{ {
$accounts = Account::with('transactions')->enabled()->take(5)->get()->map(function($account) { $accounts = Account::with('income_transactions', 'expense_transactions')->enabled()->take(5)->get()->map(function($account) {
$account->balance_formatted = money($account->balance, $account->currency_code, true); $account->balance_formatted = money($account->balance, $account->currency_code, true);
return $account; return $account;