N+1 issue solved..
This commit is contained in:
parent
a77fecff45
commit
8e67c22fe1
@ -15,7 +15,7 @@ class AccountBalance extends Widget
|
||||
|
||||
public function show()
|
||||
{
|
||||
$accounts = Account::with('income_transactions', 'expense_transactions')->enabled()->take(5)->get()->map(function($account) {
|
||||
$accounts = Account::with('transactions')->enabled()->take(5)->get()->map(function($account) {
|
||||
$account->balance_formatted = money($account->balance, $account->currency_code, true);
|
||||
|
||||
return $account;
|
||||
|
Loading…
x
Reference in New Issue
Block a user