diff --git a/app/StatusHashtag.php b/app/StatusHashtag.php index 15e28202..de67ebd6 100644 --- a/app/StatusHashtag.php +++ b/app/StatusHashtag.php @@ -26,4 +26,16 @@ class StatusHashtag extends Model { return $this->belongsTo(Profile::class); } + + public function media() + { + return $this->hasManyThrough( + Media::class, + Status::class, + 'id', + 'status_id', + 'status_id', + 'id' + ); + } }