mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New mass delete form and options. #241
This commit is contained in:
@@ -51,6 +51,21 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $journalId
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function find(int $journalId) : TransactionJournal
|
||||
{
|
||||
$journal = $this->user->transactionjournals()->where('id', $journalId)->first();
|
||||
if (is_null($journal)) {
|
||||
return new TransactionJournal;
|
||||
}
|
||||
|
||||
return $journal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users first transaction journal
|
||||
*
|
||||
@@ -131,7 +146,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
public function getJournalsOfTypes(array $types, int $page, int $pageSize = 50): LengthAwarePaginator
|
||||
{
|
||||
$offset = ($page - 1) * $pageSize;
|
||||
$query = $this->user
|
||||
$query = $this->user
|
||||
->transactionJournals()
|
||||
->expanded()
|
||||
->transactionTypes($types);
|
||||
|
Reference in New Issue
Block a user