mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Reformat some code.
This commit is contained in:
parent
6df7354c48
commit
025f739442
@ -98,11 +98,12 @@ class AccountTransformer extends AbstractTransformer
|
|||||||
|
|
||||||
// get last activity
|
// get last activity
|
||||||
// TODO move query to repository
|
// TODO move query to repository
|
||||||
$array = Transaction::whereIn('account_id',$accountIds)
|
$array = Transaction::whereIn('account_id', $accountIds)
|
||||||
->leftJoin('transaction_journals', 'transaction_journals.id', 'transactions.transaction_journal_id')
|
->leftJoin('transaction_journals', 'transaction_journals.id', 'transactions.transaction_journal_id')
|
||||||
->groupBy('transactions.account_id')
|
->groupBy('transactions.account_id')
|
||||||
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) as date_max')])->toArray();
|
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) as date_max')])->toArray()
|
||||||
foreach($array as $row){
|
;
|
||||||
|
foreach ($array as $row) {
|
||||||
$this->lastActivity[(int)$row['account_id']] = Carbon::parse($row['date_max'], config('app.timezone'));
|
$this->lastActivity[(int)$row['account_id']] = Carbon::parse($row['date_max'], config('app.timezone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user