mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Use note object instead of field #888
This commit is contained in:
@@ -48,7 +48,8 @@ class Note extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the owning noteable models. Currently only piggy bank
|
||||
* Get all of the owning noteable models. Currently piggy bank and
|
||||
* transaction journal
|
||||
*/
|
||||
public function noteable()
|
||||
{
|
||||
|
||||
@@ -260,6 +260,14 @@ class TransactionJournal extends Model
|
||||
return $this->transactionType->isWithdrawal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the notes.
|
||||
*/
|
||||
public function notes()
|
||||
{
|
||||
return $this->morphMany('FireflyIII\Models\Note', 'noteable');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user