图标,及抖音支持

This commit is contained in:
2022-07-15 21:28:58 +08:00
parent 5518f3b144
commit d0e816ec6e
4 changed files with 32 additions and 1 deletions

View File

@ -20,4 +20,19 @@ class Videos extends Model
{
return $this->hasMany(VideoDanmakus::class, "video_bvid", "bvid");
}
public function bilibili_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->danmakus()->where("platform_id", "=", 1);
}
public function ixigua_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->danmakus()->where("platform_id", "=", 2);
}
public function douyin_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->danmakus()->where("platform_id", "=", 3);
}
}