more eager loading

This commit is contained in:
Denis Duliçi
2020-06-06 22:57:29 +03:00
parent 657c86a29c
commit a16406ea1e
10 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ class AccountBalance extends Widget
public function show()
{
$accounts = Account::enabled()->take(5)->get();
$accounts = Account::with(['income_transactions', 'expense_transactions'])->enabled()->take(5)->get();
return $this->view('widgets.account_balance', [
'accounts' => $accounts,