]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/BookshelfRepo.php
Docker: Fix PHP tests
[bookstack] / app / Entities / Repos / BookshelfRepo.php
index 8f12e9dc0dc1c3e5ac7a865e4f00cc0b847c1465..649f4b0c461c0b461701bd26508af44fe0ab43c2 100644 (file)
@@ -1,8 +1,8 @@
 <?php namespace BookStack\Entities\Repos;
 
 use BookStack\Actions\ActivityType;
-use BookStack\Entities\Book;
-use BookStack\Entities\Bookshelf;
+use BookStack\Entities\Models\Book;
+use BookStack\Entities\Models\Bookshelf;
 use BookStack\Entities\Tools\TrashCan;
 use BookStack\Exceptions\ImageUploadException;
 use BookStack\Exceptions\NotFoundException;
@@ -30,7 +30,7 @@ class BookshelfRepo
     public function getAllPaginated(int $count = 20, string $sort = 'name', string $order = 'asc'): LengthAwarePaginator
     {
         return Bookshelf::visible()
-            ->with('visibleBooks')
+            ->with(['visibleBooks', 'cover'])
             ->orderBy($sort, $order)
             ->paginate($count);
     }
@@ -137,14 +137,6 @@ class BookshelfRepo
         $this->baseRepo->updateCoverImage($shelf, $coverImage, $removeImage);
     }
 
-    /**
-     * Update the permissions of a bookshelf.
-     */
-    public function updatePermissions(Bookshelf $shelf, bool $restricted, Collection $permissions = null)
-    {
-        $this->baseRepo->updatePermissions($shelf, $restricted, $permissions);
-    }
-
     /**
      * Copy down the permissions of the given shelf to all child books.
      */