From 85329330c7a346ef77cd959a3b197064e16d3f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 1 Feb 2018 18:29:19 +0900 Subject: [PATCH] Added versions to hot and new entry APIs. --- app/Http/Controllers/FileController.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/FileController.php b/app/Http/Controllers/FileController.php index 2d82970..161c4b2 100644 --- a/app/Http/Controllers/FileController.php +++ b/app/Http/Controllers/FileController.php @@ -36,7 +36,12 @@ class FileController extends Controller { public function getNewFiles() { // /api/rpc/file/getnewfiles return DB::table('str_file') - ->select('id', 'title', 'submit_date') + ->select( + 'id', + 'title', + 'version', + 'submit_date' + ) ->where('isApproved', 1) ->orderBy('submit_date', 'desc') ->limit(5) @@ -45,7 +50,12 @@ class FileController extends Controller { public function getHotFiles() { // /api/rpc/file/gethotfiles return DB::table('str_file') - ->select('id', 'title', 'downloads') + ->select( + 'id', + 'title', + 'version', + 'downloads' + ) ->where('isApproved', 1) ->orderBy('downloads', 'desc') ->limit(5)