]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/ChapterApiController.php
Applied another round of static analysis updates
[bookstack] / app / Http / Controllers / Api / ChapterApiController.php
index 6b226b5f0fcf57f6dcf0cb9d1254d4e5c73e8b5c..8459b84499ee362919e87833ad7527b2a7e33928 100644 (file)
@@ -70,7 +70,7 @@ class ChapterApiController extends ApiController
     public function read(string $id)
     {
         $chapter = Chapter::visible()->with(['tags', 'createdBy', 'updatedBy', 'ownedBy', 'pages' => function (HasMany $query) {
-            $query->visible()->get(['id', 'name', 'slug']);
+            $query->scopes('visible')->get(['id', 'name', 'slug']);
         }])->findOrFail($id);
 
         return response()->json($chapter);