From 7626d2194e12ce19d49f4b0ce4eb922334692ac1 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Mon, 12 Sep 2022 19:15:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/User/Task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/User/Task.php b/app/Models/User/Task.php index 0810878..a2822f1 100644 --- a/app/Models/User/Task.php +++ b/app/Models/User/Task.php @@ -39,7 +39,7 @@ public function scopeUser($query) public function getCurrentUserTasks() { return Cache::remember('user_tasks_' . auth()->id(), 3600, function () { - return $this->user()->with('host')->get(); + return $this->user()->with('host')->latest()->get(); }); }