]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/BookRepo.php
Improve sorting Shelf Books
[bookstack] / app / Entities / Repos / BookRepo.php
index d6dbe0b7368b7731a5aa72cf6c909a378aa031f6..27d0b407541d02857d8aec46cadbeb71cf7bc840 100644 (file)
@@ -35,7 +35,7 @@ class BookRepo
      */
     public function getAllPaginated(int $count = 20, string $sort = 'name', string $order = 'asc'): LengthAwarePaginator
     {
-        return Book::visible()->orderBy($sort, $order)->paginate($count);
+        return Book::visible()->with('cover')->orderBy($sort, $order)->paginate($count);
     }
 
     /**
@@ -114,14 +114,6 @@ class BookRepo
         $this->baseRepo->updateCoverImage($book, $coverImage, $removeImage);
     }
 
-    /**
-     * Update the permissions of a book.
-     */
-    public function updatePermissions(Book $book, bool $restricted, Collection $permissions = null)
-    {
-        $this->baseRepo->updatePermissions($book, $restricted, $permissions);
-    }
-
     /**
      * Remove a book from the system.
      * @throws Exception