]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageRepo.php
Applied StyleCI changes, added php/larastan to attribution
[bookstack] / app / Uploads / ImageRepo.php
index 67297f3087ee34fb856985cce586435fdee3a3df..2a4ea424f395ca6281ee181324d62ff6ac86600d 100644 (file)
@@ -17,7 +17,8 @@ class ImageRepo
     /**
      * ImageRepo constructor.
      */
-    public function __construct(ImageService $imageService, PermissionService $permissionService) {
+    public function __construct(ImageService $imageService, PermissionService $permissionService)
+    {
         $this->imageService = $imageService;
         $this->restrictionService = $permissionService;
     }
@@ -102,7 +103,7 @@ class ImageRepo
                 if ($filterType === 'page') {
                     $query->where('uploaded_to', '=', $contextPage->id);
                 } elseif ($filterType === 'book') {
-                    $validPageIds = $contextPage->book->pages()->visible()->get(['id'])->pluck('id')->toArray();
+                    $validPageIds = $contextPage->book->pages()->visible()->pluck('id')->toArray();
                     $query->whereIn('uploaded_to', $validPageIds);
                 }
             };