]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/BookshelfApiController.php
Applied another round of static analysis updates
[bookstack] / app / Http / Controllers / Api / BookshelfApiController.php
index de7284e61562c14391b3658c3f96dc950e42f13d..bd4f23a1093257cecd971a030d5c48109fc3a313 100644 (file)
@@ -75,7 +75,7 @@ class BookshelfApiController extends ApiController
         $shelf = Bookshelf::visible()->with([
             'tags', 'cover', 'createdBy', 'updatedBy', 'ownedBy',
             'books' => function (BelongsToMany $query) {
-                $query->visible()->get(['id', 'name', 'slug']);
+                $query->scopes('visible')->get(['id', 'name', 'slug']);
             },
         ])->findOrFail($id);