mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 04:34:00 +00:00
Lots of stuff gets cached now.
This commit is contained in:
@@ -62,9 +62,11 @@ class HomeController extends Controller
|
||||
public function index(AccountRepositoryInterface $repository)
|
||||
{
|
||||
|
||||
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
||||
$count = $repository->countAccounts($types);
|
||||
|
||||
|
||||
if ($count == 0) {
|
||||
return Redirect::route('new-user.index');
|
||||
}
|
||||
@@ -78,8 +80,11 @@ class HomeController extends Controller
|
||||
$end = Session::get('end', Carbon::now()->endOfMonth());
|
||||
$accounts = $repository->getFrontpageAccounts($frontPage);
|
||||
$savings = $repository->getSavingsAccounts();
|
||||
|
||||
$piggyBankAccounts = $repository->getPiggyBankAccounts();
|
||||
|
||||
|
||||
|
||||
$savingsTotal = 0;
|
||||
foreach ($savings as $savingAccount) {
|
||||
$savingsTotal += Steam::balance($savingAccount, $end);
|
||||
@@ -100,7 +105,6 @@ class HomeController extends Controller
|
||||
$transactions[] = [$set, $account];
|
||||
}
|
||||
}
|
||||
|
||||
return view('index', compact('count', 'title', 'savings', 'subTitle', 'mainTitleIcon', 'transactions', 'savingsTotal', 'piggyBankAccounts'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user