chenxiqiang пре 6 година
родитељ
комит
b448f10ba0
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2
    2
      manage-server/app/Http/Controllers/CommonController.php

+ 2
- 2
manage-server/app/Http/Controllers/CommonController.php Прегледај датотеку

141
         $order_id = $request->route("order_id");
141
         $order_id = $request->route("order_id");
142
         $order_type = $request->route("order_type");
142
         $order_type = $request->route("order_type");
143
         if ($order_id && $order_type) {
143
         if ($order_id && $order_type) {
144
-            return Comment::where("order_id", $order_id)->where("type", $order_type)->paginate(20);
144
+            return Comment::where("order_id", $order_id)->where("order_type", $order_type)->orderBy('id', 'desc')->paginate(20);
145
         }
145
         }
146
     }
146
     }
147
 
147
 
154
     {
154
     {
155
         $order_type = $request->route("order_type");
155
         $order_type = $request->route("order_type");
156
         if ($order_type) {
156
         if ($order_type) {
157
-            return Comment::where("type", $order_type)->orderBy('type', 'desc')->paginate(20);
157
+            return Comment::where("order_type", $order_type)->orderBy('id', 'desc')->paginate(20);
158
         }
158
         }
159
     }
159
     }
160
 
160
 

Loading…
Откажи
Сачувај