瀏覽代碼

Update AccountController

Daniel Supernault 6 年之前
父節點
當前提交
614b951c5e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/AccountController.php

+ 2 - 2
app/Http/Controllers/AccountController.php

@@ -64,12 +64,12 @@ class AccountController extends Controller
       ]);
         $profile = Auth::user()->profile;
         $action = $request->input('a');
-        $timeago = Carbon::now()->subMonths(1);
+        $timeago = Carbon::now()->subMonths(3);
         $following = $profile->following->pluck('id');
         $notifications = Notification::whereIn('actor_id', $following)
           ->where('profile_id', '!=', $profile->id)
           ->whereDate('created_at', '>', $timeago)
-          ->orderBy('notifications.id', 'desc')
+          ->orderBy('notifications.created_at', 'desc')
           ->simplePaginate(30);
 
         return view('account.following', compact('profile', 'notifications'));