1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/StatusHashtag.php
2019-07-01 23:06:37 -06:00

41 lines
639 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class StatusHashtag extends Model
{
public $fillable = [
'status_id',
'hashtag_id',
'profile_id'
];
public function status()
{
return $this->belongsTo(Status::class);
}
public function hashtag()
{
return $this->belongsTo(Hashtag::class);
}
public function profile()
{
return $this->belongsTo(Profile::class);
}
public function media()
{
return $this->hasManyThrough(
Media::class,
Status::class,
'id',
'status_id',
'status_id',
'id'
);
}
}