From 325ae4ad087cca1505fc0ff7306a2d5a7a53a2a3 Mon Sep 17 00:00:00 2001 From: Justin Lau Date: Tue, 25 Oct 2016 00:21:18 +0800 Subject: [PATCH] Return the latest uploaded (updated) file path. --- modules/backend/models/ImportModel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/backend/models/ImportModel.php b/modules/backend/models/ImportModel.php index 01e457916..0739461ff 100644 --- a/modules/backend/models/ImportModel.php +++ b/modules/backend/models/ImportModel.php @@ -195,6 +195,7 @@ abstract class ImportModel extends Model $file = $this ->import_file() ->withDeferred($sessionKey) + ->orderBy('updated_at', 'desc') ->first() ;