]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SiblingFetcher.php
ZIP Imports: Added API examples, finished testing
[bookstack] / app / Entities / Tools / SiblingFetcher.php
index 34d0fc6b07e465c3bdc85dbaf7174fdc668ecf24..156209fd23e78ef641cb7324d477a1e469c54466 100644 (file)
@@ -43,13 +43,13 @@ class SiblingFetcher
             if ($contextShelf) {
                 $entities = $contextShelf->visibleBooks()->get();
             } else {
-                $entities = $this->queries->books->visibleForList()->get();
+                $entities = $this->queries->books->visibleForList()->orderBy('name', 'asc')->get();
             }
         }
 
         // Shelf
         if ($entity instanceof Bookshelf) {
-            $entities = $this->queries->shelves->visibleForList()->get();
+            $entities = $this->queries->shelves->visibleForList()->orderBy('name', 'asc')->get();
         }
 
         return $entities;