Attachment model and database changes.

This commit is contained in:
James Cole
2015-07-18 09:49:19 +02:00
parent a34782575f
commit b0beab4cd3
4 changed files with 98 additions and 0 deletions

View File

@@ -467,6 +467,14 @@ class TransactionJournal extends Model
$this->attributes['encrypted'] = true;
}
/**
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function attachments()
{
return $this->morphMany('App\Models\Attachment', 'attachable');
}
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo