mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-23 07:20:01 +00:00
Update StatusHashtag model, add media relation
This commit is contained in:
parent
7591eadbd1
commit
7ffb4c4a45
1 changed files with 12 additions and 0 deletions
|
@ -26,4 +26,16 @@ class StatusHashtag extends Model
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Profile::class);
|
return $this->belongsTo(Profile::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function media()
|
||||||
|
{
|
||||||
|
return $this->hasManyThrough(
|
||||||
|
Media::class,
|
||||||
|
Status::class,
|
||||||
|
'id',
|
||||||
|
'status_id',
|
||||||
|
'status_id',
|
||||||
|
'id'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue