mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
API can deal with attachments for more models. #2828
This commit is contained in:
@@ -479,4 +479,12 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$autoBudget->delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getAttachments(Budget $budget): Collection
|
||||
{
|
||||
return $budget->attachments()->get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function destroyAll(): void;
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAttachments(Budget $budget): Collection;
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user