From 2d23f11ee919a7a5ee696edb62809c11a991dd25 Mon Sep 17 00:00:00 2001 From: Siwat Techavoranant Date: Thu, 26 Oct 2023 09:57:07 +0700 Subject: [PATCH] fix: personnel year list ordering --- app/Models/Personnel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Personnel.php b/app/Models/Personnel.php index 84f1ed1..517f362 100644 --- a/app/Models/Personnel.php +++ b/app/Models/Personnel.php @@ -28,6 +28,6 @@ public static function getYear($year = null): Collection public static function getYearList(): array { - return Cache::remember('personnel-year-list', 7200, fn() => self::pluck('year')->unique()->sortDesc()->toArray()); + return Cache::remember('personnel-year-list', 7200, fn() => self::pluck('year')->unique()->sortDesc()->values()); } }