From fa4f9a29c513c3528561e647cf7ae50792906bf1 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 17 May 2021 00:56:23 +0800 Subject: [PATCH] snatch list paginate --- app/Repositories/TorrentRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/TorrentRepository.php b/app/Repositories/TorrentRepository.php index e80bd278..6620142a 100644 --- a/app/Repositories/TorrentRepository.php +++ b/app/Repositories/TorrentRepository.php @@ -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));