snatch list paginate

This commit is contained in:
xiaomlove
2021-05-17 00:56:23 +08:00
parent d598c57891
commit fa4f9a29c5

View File

@@ -221,7 +221,7 @@ class TorrentRepository extends BaseRepository
->where('finished', Snatch::FINISHED_YES)
->with(['user'])
->orderBy('completedat', 'desc')
->get();
->paginate();
foreach ($snatches as &$snatch) {
$snatch->upload_text = sprintf('%s@%s', mksize($snatch->uploaded), $this->getSnatchUploadSpeed($snatch));
$snatch->download_text = sprintf('%s@%s', mksize($snatch->uploaded), $this->getSnatchDownloadSpeed($snatch));