Some new code + GA

This commit is contained in:
James Cole
2015-03-31 19:21:49 +02:00
parent f8a5fb4225
commit e11e53913a
13 changed files with 84 additions and 28 deletions

View File

@@ -133,8 +133,8 @@ class AccountRepository implements AccountRepositoryInterface
->where('account_meta.name', 'accountRole')
->where('account_meta.data', '"savingAsset"')
->get(['accounts.*']);
$start = clone Session::get('start');
$end = clone Session::get('end');
$start = clone Session::get('start', new Carbon);
$end = clone Session::get('end', new Carbon);
$accounts->each(
function (Account $account) use ($start, $end) {

View File

@@ -264,4 +264,12 @@ class JournalRepository implements JournalRepositoryInterface
return [$from, $to];
}
}
/**
* Get users first transaction journal
*
* @return TransactionJournal
*/
public function first()
{
return Auth::user()->transactionjournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
}}

View File

@@ -44,4 +44,10 @@ interface JournalRepositoryInterface
* @return mixed
*/
public function update(TransactionJournal $journal, array $data);
/**
* Get users first transaction journal
* @return TransactionJournal
*/
public function first();
}