[admin] torrent add more bulk action

This commit is contained in:
xiaomlove
2022-10-02 21:14:11 +08:00
parent cdaec9bc62
commit bb000fb67a
28 changed files with 313 additions and 28 deletions

View File

@@ -48,6 +48,14 @@ class Tag extends NexusModel
],
];
public static function listSpecial(): array
{
return array_filter([
Setting::get('system.official_tag'),
Setting::get('system.zero_bonus_tag'),
]);
}
public function torrents(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
{
return $this->belongsToMany(Torrent::class, 'torrent_tags', 'tag_id', 'torrent_id');