API can deal with attachments for more models. #2828

This commit is contained in:
James Cole
2020-03-19 08:32:42 +01:00
parent 3246b7eb9f
commit 75afe35e98
21 changed files with 277 additions and 4 deletions

View File

@@ -479,4 +479,12 @@ class BudgetRepository implements BudgetRepositoryInterface
$autoBudget->delete();
}
}
/**
* @inheritDoc
*/
public function getAttachments(Budget $budget): Collection
{
return $budget->attachments()->get();
}
}

View File

@@ -39,6 +39,13 @@ interface BudgetRepositoryInterface
*/
public function destroyAll(): void;
/**
* @param Budget $budget
*
* @return Collection
*/
public function getAttachments(Budget $budget): Collection;
/**
* @param Budget $budget
*