From 23f7d580100954158b3f6583d177438187e19253 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 11 May 2018 17:58:55 +0100 Subject: [PATCH] Add tags to the Incident model --- app/Models/Incident.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/Incident.php b/app/Models/Incident.php index c9be0e91..2c40038f 100644 --- a/app/Models/Incident.php +++ b/app/Models/Incident.php @@ -177,6 +177,16 @@ class Incident extends Model implements HasPresenter return $this->morphMany(Meta::class, 'meta'); } + /** + * Get the tags relation. + * + * @return \Illuminate\Database\Eloquent\Relations\MorphMany + */ + public function tags() + { + return $this->morphMany(Taggable::class, 'taggable'); + } + /** * Get the updates relation. *