Merge branch '1.9' into php8

This commit is contained in:
xiaomlove
2025-10-29 17:18:00 +07:00
8 changed files with 67 additions and 62 deletions

View File

@@ -70,6 +70,7 @@ class TorrentResource extends BaseResource
'description' => $this->whenHas('description'),
'images' => $this->whenHas('images'),
'download_url' => $this->whenHas('download_url'),
'active_status' => $this->whenHas('active_status'),
'user' => new UserResource($this->whenLoaded('user')),
'extra' => new TorrentExtraResource($this->whenLoaded('extra')),
'tags' => TagResource::collection($this->whenLoaded('tags')),
@@ -97,14 +98,6 @@ class TorrentResource extends BaseResource
return self::NAME;
}
private function getTorrentRep(): TorrentRepository
{
if (!isset(self::$torrentRep)) {
self::$torrentRep = new TorrentRepository();
}
return self::$torrentRep;
}
protected function hex_esc($matches) {
return sprintf("%02x", ord($matches[0]));
}