From a32250884cda06e2f0b3f391e680f5be860de02d Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 17 Aug 2015 15:52:39 +0930 Subject: [PATCH] Ensure posts are sorted correctly --- src/Core/Posts/PostRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Posts/PostRepository.php b/src/Core/Posts/PostRepository.php index 5e69214d9..ee04f7b44 100644 --- a/src/Core/Posts/PostRepository.php +++ b/src/Core/Posts/PostRepository.php @@ -89,7 +89,7 @@ class PostRepository $posts = Post::with('discussion')->whereIn('id', $visibleIds)->get(); - $posts->sort(function ($a, $b) use ($ids) { + $posts = $posts->sort(function ($a, $b) use ($ids) { $aPos = array_search($a->id, $ids); $bPos = array_search($b->id, $ids);