diff --git a/src/Controllers/ManagerController.php b/src/Controllers/ManagerController.php index 99deee6..ded36a2 100644 --- a/src/Controllers/ManagerController.php +++ b/src/Controllers/ManagerController.php @@ -140,7 +140,7 @@ public function index(Request $request, MenuHandler $menus) $query = $this->makeWhere($query, $request); } - $comments = $query->orderBy(Comment::CREATED_AT)->with('target')->paginate(); + $comments = $query->orderBy(Comment::CREATED_AT, 'desc')->with('target')->paginate()->appends($request->except('page')); $map = $this->handler->getInstanceMap(); $menuItems = $menus->items()->fetchIn(array_keys($map), 'route')->getDictionary(); @@ -251,7 +251,7 @@ public function trash(Request $request, MenuHandler $menus) $comments = $model->newQuery() ->whereIn('instance_id', $this->getInstances()) ->where('status', Comment::STATUS_TRASH) - ->orderBy(Comment::CREATED_AT)->paginate(); + ->orderBy(Comment::CREATED_AT, 'desc')->paginate()->appends($request->except('page')); $map = $this->handler->getInstanceMap(); $menuItems = $menus->items()->fetchIn(array_keys($map), 'route')->getDictionary();