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'
|
|
|
|
];
|
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);
|
|
|
|
}
|
2019-07-02 05:06:37 +00:00
|
|
|
|
|
|
|
public function media()
|
|
|
|
{
|
|
|
|
return $this->hasManyThrough(
|
|
|
|
Media::class,
|
|
|
|
Status::class,
|
|
|
|
'id',
|
|
|
|
'status_id',
|
|
|
|
'status_id',
|
|
|
|
'id'
|
|
|
|
);
|
|
|
|
}
|
2018-06-01 03:15:37 +00:00
|
|
|
}
|