mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
Merge branch '1.9' into php8
This commit is contained in:
@@ -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]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user