Use other method of collecting query fields. #142

This commit is contained in:
James Cole
2016-04-29 21:52:15 +02:00
parent 94a79876ce
commit 9baadd3793
9 changed files with 19 additions and 41 deletions

View File

@@ -121,7 +121,7 @@ class JournalRepository implements JournalRepositoryInterface
->orderBy('date', 'DESC')
->orderBy('order', 'ASC')
->orderBy('id', 'DESC')
->get(TransactionJournal::QUERYFIELDS);
->get(TransactionJournal::queryFields());
return $set;
}
@@ -153,7 +153,7 @@ class JournalRepository implements JournalRepositoryInterface
$count = $query->count();
$set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::QUERYFIELDS);
$set = $query->take($pageSize)->offset($offset)->get(TransactionJournal::queryFields());
$journals = new LengthAwarePaginator($set, $count, $pageSize, $page);
return $journals;