mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
API can deal with attachments for more models. #2828
This commit is contained in:
@@ -49,7 +49,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @property int $account_id
|
||||
* @property bool encrypted
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property bool $encrypted
|
||||
* @property-read Collection|Note[] $notes
|
||||
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
|
||||
* @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
|
||||
@@ -122,6 +121,15 @@ class PiggyBank extends Model
|
||||
throw new NotFoundHttpException;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function attachments(): MorphMany
|
||||
{
|
||||
return $this->morphMany(Attachment::class, 'attachable');
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return BelongsTo
|
||||
|
Reference in New Issue
Block a user