New method for transaction matcher.

This commit is contained in:
James Cole 2016-02-17 20:31:18 +01:00
parent 49211482b0
commit 1cf0125d1b
2 changed files with 30 additions and 0 deletions

View File

@ -76,6 +76,27 @@ class JournalRepository implements JournalRepositoryInterface
}
/**
* @param array $types
* @param int $offset
* @param int $count
*
* @return Collection
*/
public function getCollectionOfTypes(array $types, int $offset, int $count)
{
$set = Auth::user()->transactionJournals()->transactionTypes($types)
->take($count)->offset($offset)
->orderBy('date', 'DESC')
->orderBy('order', 'ASC')
->orderBy('id', 'DESC')
->get(
['transaction_journals.*']
);
return $set;
}
/**
* @param TransactionType $dbType
*

View File

@ -55,6 +55,15 @@ interface JournalRepositoryInterface
*/
public function getJournalsOfTypes(array $types, int $offset, int $page);
/**
* @param array $types
* @param int $offset
* @param int $count
*
* @return Collection
*/
public function getCollectionOfTypes(array $types, int $offset, int $count);
/**
* @param string $type
*