X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/546cfb0dcc801c4fa6560ca0e6d18b4f1edd830f..refs/pull/5725/head:/app/Entities/Queries/BookshelfQueries.php diff --git a/app/Entities/Queries/BookshelfQueries.php b/app/Entities/Queries/BookshelfQueries.php index f2fe50531..19717fb7c 100644 --- a/app/Entities/Queries/BookshelfQueries.php +++ b/app/Entities/Queries/BookshelfQueries.php @@ -8,6 +8,11 @@ use Illuminate\Database\Eloquent\Builder; class BookshelfQueries implements ProvidesEntityQueries { + protected static array $listAttributes = [ + 'id', 'slug', 'name', 'description', + 'created_at', 'updated_at', 'image_id', 'owned_by', + ]; + public function start(): Builder { return Bookshelf::query(); @@ -46,7 +51,7 @@ class BookshelfQueries implements ProvidesEntityQueries public function visibleForList(): Builder { - return $this->start()->scopes('visible'); + return $this->start()->scopes('visible')->select(static::$listAttributes); } public function visibleForListWithCover(): Builder