Update StatusHashtag model, add media relation

This commit is contained in:
Daniel Supernault 2019-07-01 23:06:37 -06:00
parent 7591eadbd1
commit 7ffb4c4a45
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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'
);
}
}