orderBy('created_at', 'desc') ->where('created_by', '=', $user->id) ->take($count) ->get(); }; return [ 'pages' => $query($this->queries->pages->visibleForList()->where('draft', '=', false)), 'chapters' => $query($this->queries->chapters->visibleForList()), 'books' => $query($this->queries->books->visibleForList()), 'shelves' => $query($this->queries->shelves->visibleForList()), ]; } }