pixelfed/app/StatusHashtag.php

43 lines
665 B
PHP
Raw Normal View History

2018-06-01 03:15:37 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class StatusHashtag extends Model
{
2019-03-02 05:27:43 +00:00
public $fillable = [
'status_id',
'hashtag_id',
'profile_id',
'status_visibility'
2019-03-02 05:27:43 +00:00
];
2019-02-03 21:49:47 +00:00
public function status()
{
return $this->belongsTo(Status::class);
}
public function hashtag()
{
return $this->belongsTo(Hashtag::class);
}
2019-03-02 05:27:43 +00:00
public function profile()
{
return $this->belongsTo(Profile::class);
}
public function media()
{
return $this->hasManyThrough(
Media::class,
Status::class,
'id',
'status_id',
'status_id',
'id'
);
}
2018-06-01 03:15:37 +00:00
}