From 08703e282facf69a8627e636d8eb187a7dd41218 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 30 Dec 2015 09:30:06 +0100 Subject: [PATCH] Fix array. --- app/Repositories/Account/AccountRepository.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 98dd114014..90eb46cd13 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -266,9 +266,10 @@ class AccountRepository implements AccountRepositoryInterface */ public function getPiggyBankAccounts() { - $start = clone Session::get('start', new Carbon); - $end = clone Session::get('end', new Carbon); - $ids = DB::table('piggy_banks')->distinct()->get(['piggy_banks.account_id'])->pluck('account_id')->toArray(); + $start = clone Session::get('start', new Carbon); + $end = clone Session::get('end', new Carbon); + $collection = new Collection(DB::table('piggy_banks')->distinct()->get(['piggy_banks.account_id'])); + $ids = $collection->pluck('account_id')->toArray(); $accounts = new Collection; $cache = new CacheProperties;