Browse Source

列表默认按时间倒序

visuddhinanda 3 years ago
parent
commit
c8382443a6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/DiscussionController.php

+ 1 - 1
app/Http/Controllers/DiscussionController.php

@@ -44,7 +44,7 @@ class DiscussionController extends Controller
         if(!empty($request->get('order')) && !empty($request->get('dir'))){
             $table->orderBy($request->get('order'),$request->get('dir'));
         }else{
-            $table->orderBy('updated_at','asc');
+            $table->orderBy('updated_at','desc');
         }
         $count = $table->count();
         if(!empty($request->get('limit'))){